From: NIIBE Y. <gn...@m1...> - 2002-02-22 02:21:09
|
Michael Eager wrote: > What problem does this patch fix? I've encountered following problem. Upgraded to glibc 2.2.5 and newer binutils. Build whole things. Building libgcc.so, libobjc.so, libgcj.so, the assertion in elf32-sh.c:sh_elf_relocate_section BFD_ASSERT (off != (bfd_vma) -1); failed. (And with this libobjc.so, half of testsuites failed). This is because we have relocation of type GOT32 for __cxa_finalize in crtbeginS.o and it's offset is 0 (ZERO). The value ZERO is valid here. However, when got.offset is 0, it is wrongly overwritten to -1 in elf.c:_bfd_elf_link_hash_copy_indirect, this is cause of assertion failure. Note that got.refcount and got.offset is union, and placed in same memory. It works fine provided got.offset > 0, but when got.offset ==0, accessing as got.refcount, it looks it's not used (from view of refcount). Backend with can_refcount==0 used to work fine. But it seems for me that can_refcount==1 is the trend. In backend with can_refcount==1, got.refcount is used untill last time. At last time, the role will change to have offset and offset value will be set. -- |