eh_frame optimization for ld -r
Alan Modra
amodra@bigpond.net.au
Fri Nov 1 04:44:00 GMT 2002
Jakub,
What do you think of the idea of discarding unused eh entries
during ld -r? I'm floating the idea because currently a ld -r
on C++ files seems to break eh info. On powerpc64-linux, ld -r
gives a .rela.eh_frame containing relocs like:
000000000940 000000000026 R_PPC64_ADDR64 0000000000000000
ie. against STN_UNDEF. These are from relocs against discarded
linkonce sections. Unfortunately when doing a final link using
such an object, reloc_symbol_deleted_p doesn't regard these as
being deleted.
Pruning eh_frame during ld -r would stop this problem happening,
and also cater for people who want to create linux kernel modules
written in C++.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list