A DT_INIT/DT_FINI glibc patch.
Quoted 3 lines · Grant Grundler
I'm afraid we will break binary compatibility for elf32 hppa-linux again. I only raise this in case there is really a "right" way to fix the DT_INIT/DT_FINI problem.
The fix involves pruning out all the special handling in bfd/elf32-hppa.c for DT_INIT,DT_FINI, and making some small changes to glibc. H.J. Lu has already made the necessary framework changes, and all we need to do is something like
#define DL_FUNCTION_ADDRESS(map, addr) _dl_start_address (map, addr) #define DL_DT_INIT_ADDRESS(map, addr) \
((addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
with similar defines for DT_FINI. The test for (addr) & 2 is the fairly innocuous fudge to support old binaries.
Another glibc issue (which is why I'm sending this back to the list) is that there has been quite some discussion on the binutils list over the use of the EI_OSABI field. The conclusion being that it isn't really correct to use this field to discern the intendend execution platform. It's purpose is really to tell ELF tools that a file contains fields and values that need to be interpreted in a non-standard way. Since both elf32-hppa and elf64-hppa follow the standards, I'm inclined to think that the gnu tools should set EI_OSABI to zero for both HPUX and Linux targets.
Instead the .note.ABI-tag section should be examined to determine the target, which sadly isn't set correctly at the moment. :-(
Alan Modra
Signature · 1 line
Linuxcare. Support for the Revolution.
Quoted 2 lines · On Tue, 21 Nov 2000, I wrote:
Instead the .note.ABI-tag section should be examined to determine the target, which sadly isn't set correctly at the moment. :-(
Actually, it is set correctly. A comment in csu/abi-note.S was wrong.
Signature · 1 line
Linuxcare. Support for the Revolution.