This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Relocation type for sbss is R_MIPS_GPREL16 ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]