This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]