elf refcount initializer breaks mips-irix6 linking
Alexandre Oliva
aoliva@redhat.com
Tue Nov 19 10:53:00 GMT 2002
_bfd_elf_link_hash_table_init would initialize the hashtable's
init_refcount with 0xffffffff, instead of (signed_bfd_vma)-1. That's
because can_refcount was (unsigned)0, from which 1 was subtracted
resulting (unsigned)-1, then zero-extended to (signed_bfd_vma). This
caused problems to the mips linker, that used MINUS_ONE (defined as
(((bfd_vma)0) - 1) to check for got offsets (got.refcount and
got.offset are members of a union, initialized to init_refcount).
This patch fixes the problem that causes the initializer of
got.refcount of every hashtable member to be miscomputed. I'm getting
closer to getting irix to bootstrap, but I'm not quite there yet, so
this hasn't got as much testing as a full bootstrap of the toolchain
:-( Also, this has some potential for breaking other targets that,
unlike mips, fail to use a properly-extended MINUS_ONE constant. I
haven't looked for those.
Ok to install?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bfd-elf-refcount-init.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20021119/a3ce2fe9/attachment.bin>
-------------- 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