public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* R_MIPS_GOT16 relocation in GOLD
@ 2011-08-15 14:34 Aleksandar Simeonov
  0 siblings, 0 replies; only message in thread
From: Aleksandar Simeonov @ 2011-08-15 14:34 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: rich, binutils

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-15 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 14:34 R_MIPS_GOT16 relocation in GOLD Aleksandar Simeonov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).