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]

Relocation type for sbss is R_MIPS_GPREL16 ?


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



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