summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/ia64
Commit message (Collapse)AuthorAgeFilesLines
* Fix a nasty memory corruption bug caused by having a bogus pointermarcel2002-08-221-0/+8
| | | | | | | | | | | | for the DT_IA64_PLT_RESERVE dynamic table entry. When a shared object does not have any PLT relocations, the linker apparently doesn't find it necessary to actually reserve the space for the BOR (Bind On Reference) entries as pointed to by the DTE. As a result, relocatable data in the PLT was overwritten, causing some unexpected control flow with annoyingly predictable outcome: coredump. To reproduce: % echo 'int main() { return 0; }' > foo.c % cc -o foo foo.c -lxpg4
* Add support for the R_IA64_IPLTLSB relocation in non-PLT context.marcel2002-08-201-0/+30
| | | | | | This relocation creates a function descriptor at the specified address and is commonly used for C++ to create virtual function tables.
* Remove the nanosleep calls from the spin loops in the locking code.jdp2002-07-061-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They provided little benefit (if any) and they caused some problems in OpenOffice, at least in post-KSE -current and perhaps in other environments too. The nanosleep calls prevented the profiling timer from advancing during the spinloops, thereby preventing the thread scheduler from ever pre-empting the spinning thread. Alexander Kabaev diagnosed this problem, Martin Blapp helped with testing, and Matt Dillon provided some helpful suggestions. This is a short-term fix for a larger problem. The use of spinlocking isn't guaranteed to work in all cases. For example, if the spinning thread has higher priority than all other threads, it may never be pre-empted, and the thread holding the lock may never progress far enough to release the lock. On the other hand, spinlocking is the only locking that can work with an arbitrary unknown threads package. I have some ideas for a much better fix in the longer term. It would eliminate all locking inside the dynamic linker by making it safe for symbol lookups and lazy binding to proceed in parallel with a call to dlopen or dlclose. This means that the only mutual exclusion needed would be to prevent multiple simultaneous calls to dlopen and/or dlclose. That mutual exclusion could be put into the native pthreads library. Applications using foreign threads packages would have to make their own arrangements to ensure that they did not have multiple threads in dlopen and/or dlclose -- a reasonable requirement in my opinion. MFC after: 3 days
* The last bits of the alloca -> mmap fix. IA64 and SPARC64 (current only).dillon2002-06-221-17/+43
| | | | | | | | Untested (testing request went unanswered), but sparc64 is not expected to cause problems. IA64 is not expected to cause problems but the patch was slightly more complex so the possibility exists. Approved by: jdp
* Include machine/ia64_cpu.h because we use ia64_mf().marcel2002-05-211-0/+1
| | | | Submitted by: ru
* Fix handling of weak references to undefined symbols on ia64:marcel2002-04-271-28/+20
| | | | | | | | | | | | | | | | 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
* Now that local symbols aren't looked up with the symbol hash table,marcel2002-04-271-10/+3
| | | | binding works for local symbols. Remove the workaround...
* Fix a relocation bug in the ia64 ld.so. Weak function pointers in sharedpeter2002-04-071-3/+16
| | | | | | | | | | | 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.
* Update rtld for the "new" ia64 ABI. In the old toolchain, thepeter2001-10-292-0/+13
| | | | | | | | | | | | | | | 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
* Fix a dependency violation (branch after alloc)peter2001-10-291-1/+1
|
* Add ia64 support. Various adjustments were made to existing targets todfr2001-10-155-0/+981
cope with a few interface changes required by the ia64. In particular, function pointers on ia64 need special treatment in rtld.
OpenPOWER on IntegriCloud