This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
eh_frame optimization for ld -r
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 1 Nov 2002 23:14:01 +1030
- Subject: eh_frame optimization for ld -r
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