Commit Graph

6 Commits

Author SHA1 Message Date
Marcel Moolenaar
2aba02382e Fix handling of weak references to undefined symbols on ia64:
o  Set st_shndx for sym_zero to SHN_UNDEF instead of SHN_ABS.
   This gives us something to reliably test against.
o  For weak references to undefined sysmbols (as indicated by
   having st_shndx equals SHN_UNDEF) in the context of OPDs,
   the address of the OPD is to be zero, not the address of
   the function it contains.
o  For weak references to undefined symbols in all other cases
   (only DIR64LSB at this time), the actual relocated value is
   to be zero, not the value prior to relocating.

Roughly speaking, weak references to undefined symbols are no-ops.

Tested on: i386, ia64
2002-04-27 05:32:51 +00:00
Marcel Moolenaar
c7e3bd1ce6 Now that local symbols aren't looked up with the symbol hash table,
binding works for local symbols. Remove the workaround...
2002-04-27 02:53:31 +00:00
Peter Wemm
968253905e Fix a relocation bug in the ia64 ld.so. Weak function pointers in shared
objects were not being correctly set to zero.  Instead, the function
descriptor pointer was set to the load address of the .so object.  This
caused gcc generated binaries to segfault on exit when crtbegin.asm's
_fini code tested the __cxa_finalize() function pointer for zero.

This is a bit of a hack because of a problem nearby workaround for
find_symdef and its quirks (failures) for local symbols.  This still
needs to be fixed.
2002-04-07 04:16:35 +00:00
Peter Wemm
14a55adf36 Update rtld for the "new" ia64 ABI. In the old toolchain, the
DT_INIT and DT_FINI tags pointed to fptr records.  In 2.11.2, it points
to the actuall address of the function.  On IA64 you cannot just take
an address of a function, store it in a function pointer variable and
call it.. the function pointers point to a fptr data block that has the
target gp and address in it.  This is absolutely necessary for using
the in-tree binutils toolchain, but (unfortunately) will not work with
old shared libraries.  Save your old ld-elf.so.1 if you want to use
old ones still.  Do not mix-and-match.

This is a no-op change for i386 and alpha.

Reviewed by:	dfr
2001-10-29 10:10:10 +00:00
Peter Wemm
d4cf88ddc4 Fix a dependency violation (branch after alloc) 2001-10-29 10:05:32 +00:00
Doug Rabson
b5393d9f78 Add ia64 support. Various adjustments were made to existing targets to
cope with a few interface changes required by the ia64. In particular,
function pointers on ia64 need special treatment in rtld.
2001-10-15 18:48:42 +00:00