This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Relocation type for sbss is R_MIPS_GPREL16 ?
- From: cgd at broadcom dot com
- To: feroz at acmet dot com
- Cc: binutils at sources dot redhat dot com,ranjeeta at acmet dot com,sonalsharma at acmet dot com
- Date: 04 May 2004 10:01:56 -0700
- Subject: Re: Relocation type for sbss is R_MIPS_GPREL16 ?
- References: <001d01c431a6$dfe55f60$7200a8c0@FEROZ><mailpost.1083655087.7822@news-sj1-1>
At Tue, 4 May 2004 07:18:07 +0000 (UTC), "K. Ahmed Feroz" wrote:
> Why does GNU assembler generate relocation type as R_MIPS_GPREL16 for
> data in .sbss section?
because .sbss data is meant to be accessed relative to the 'gp'
(global pointer) register. (See pp. 251-253 of See Mips Run by
Dominic Sweetman for a more verbose description.)
If you want to avoid this, you can use -G0, but depending on exactly
what you're doing that may not be desirable.
cgd