Relocation type for sbss is R_MIPS_GPREL16 ?
K. Ahmed Feroz
feroz@acmet.com
Tue May 4 07:17:00 GMT 2004
Hi,
I have a doubt, please confirm me.
The relocation type produced by the GNU assembler for the LW instruction
depends upon the size of data.
For example, for the two instructions -
#testnode1:
lw $13,sbss_var($0)
#testnode2
lw $13,bss_var($0)
where sbss_var is defined in .sbss section and bss_var is defined in
.bss section,
the relocation types are - R_MIPS_GPREL16 for testnode1
R_MIPS_HI16 followed by R_MIPS_LO16, for testnode2.
I tried generating relocation type as R_MIPS_LO16 for variable in .sbss
section. The disassembled code for the corresponding '.out' file
contained the correct value for the variable.
Why does GNU assembler generate relocation type as R_MIPS_GPREL16 for
data in .sbss section?
Regards
K.Feroz
More information about the Binutils
mailing list