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]

What is to be updated in reginfo section coprocessor register mask?


Hi,

I have some query regarding the ".reginfo section" produced by gnu
assembler in the elf output file.

The .reginfo section contains information about general purpose
registers used in the assembly file, the coprocessor registers used in
the assembly file and some offset value for the GP register.

However, the coprocessor register mask and the value for the offset of
GP register are always initialized to 0(zero).


Is this the correct behaviour?



Secondly, if there is some relocation with respect to GP register,
should the offset of GP to be subtracted from the addend at which
relocation is to be done?

For example,
.lcomm	l_var2.3,8
sw	$2,l_var2.3

The opcode for the above instruction is   af82c008

and relocation record is (.sbss ,R_MIPS_GPREL16)

Here we see that the 16 bit immediate value is 0xc008

Which is formed by subtracting 0x0008-0x4000 = 0xc008

If the PC location value of the l_var2.3 is 0x0008

GP Value is 0x4000

Please confirm my queries .....

Regards
K.Feroz



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