This is the mail archive of the binutils@sourceware.org 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]

R_MIPS_GOT16 relocation in GOLD


Hi Ian,
Again I have a problem that I can't find solution. Situation is as follows:
- there are multiple R_MIPS_GOT16 relocations in a file against same
symbol, but with different addends (part of the code is shown below):
a0:	3c040000 	lui	a0,0x0
			a0: R_MIPS_GOT16	.text
a8:	3c040000 	lui	a0,0x0
			a8: R_MIPS_GOT16	.text
b0:	3c040000 	lui	a0,0x0
			b0: R_MIPS_GOT16	.text
b8:	3c040001 	lui	a0,0x1
			b8: R_MIPS_GOT16	.text

- R_MIPS_GOT16 relocation is relocation against .got section.
- .got section contains values of symbols increased by addend.
- it only contains unique values (duplicate values are discarded).
- relocation value is relative offset between global pointer value and
address of data in .got section.

Only place I found to add new fields to .got section is in
Target_mips::Scan::local/global, but there is not known value of addend
and I can't find if some field already contains value that I want to
add. Also, those data are not known in do_write function. Only during
relocation all necessary data are known, but problem is that size of
.got section is fixed.

Is there a way to overcome that problem with missing addend information
and to add only unique values in .got section? Or there is some other
possible solution?

Thanks in advance for your help,
Aleksandar


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