MIPS multi-got link support

Alexandre Oliva aoliva@redhat.com
Sun Jan 26 05:57:00 GMT 2003


On Jan 14, 2003, Alexandre Oliva <aoliva@redhat.com> wrote:

> Yeah, testcases, I hear someone screaming :-)

Ok, having bfd ids, I've tweaked the multi-got code so as to no longer
use htab_hash_pointer.  For bfds, we use their ids, for symbols' hash
entries, we use the bfd-computed hash of the symbol name.  I've
adjusted the patch to reflect the introduction of
mips_elf_section_data and added a linker testcase.  I thought of
generating the testcase sources on the fly, but since the output
couldn't possibly be generated (unless we duplicated the logic of the
hashtable construction and walking in tcl, something I wasn't quite
looking forward to doing :-), I thought the inputs could go in the
testsuite too.

The testcase is a bit simplistic, but it does test a lot.  The offsets
of the explicitly-relocated GOT entries, compared with the PLTGOT
entry in the dynamic section, indicate they're being applied to the
second GOT, and MIPS_GOTSYM and MIPS_SYMTABNO indicate that there are
GOT entries for all of the sym_1_* symbols, as well as forced GOT
entries for the sym_2_* symbols in the primary got.  Their high
dynindx, represented in the info field of the relocations, indicate
they're past the primary GOT symbols in the primary GOT, which is
intended since they're not referenced in code that uses the primary
GOT.

Since the patch is big, particularly with the testcase, I'm posting it
bzip2ed, except for the patch for include/elf, that's small enough and
unchanged since the first posting. Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: include-mips-multi-got.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030126/d3ec3393/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd-mips-multi-got.patch.bz2
Type: application/x-bzip2
Size: 15161 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030126/d3ec3393/attachment.bz2>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld-mips-multi-got.patch.bz2
Type: application/x-bzip2
Size: 148697 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030126/d3ec3393/attachment-0001.bz2>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Binutils mailing list