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]

Re: mips multi-got error


Thiemo Seufer wrote:
David Daney wrote:
[snip]

That is not supposed to work. Multi-got linking only works if there are fewer than 8192 symbols per compilation unit (input .o to the linker). See the multi-got-1 testcase in ld/testsuite/ld-mips-elf.

If you need more than 8192 symbols per compilation unit you must use -xgot for the assembler. Recent GCC versions have a -mxgot option that does the same thing for GCC.


Actually, it is supposed to work. :-)  It is also a known deficiency
in the current assembler/linker implementation.

How?


The gp is set in the function prolog. If a single function references more got/plt entries than can be indexed with a 16 bit offset, wouldn't you need to either load the gp before each got access(very inefficient I would think) or use a 32 bit offset (somewhat inefficient)?

David Daney.


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