This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
.eh_frame optimization question
- From: "Jie Zhang" <jzhang918 at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 25 Dec 2006 22:59:43 +0800
- Subject: .eh_frame optimization question
Hi,
I'm looking at a bug of bfin port ld. With ELF FD-PIC ABI, bfin ld
will generate a relocation of type R_BFIN_FUNCDESC against symbol
__gxx_personality_v0 in .eh_frame section when compiling C++ program.
The number of such relocations are counted in size_dynamic_sections ()
and the size of the corresponding section are calculated at that time.
__gxx_personality_v0 is used in the CIE entry of the .eh_frame.
However, it's possible that .eh_frame optimization discards all FDE
entries which use the CIE entry, so the CIE entry can be eliminated,
too. Thus when bfinfdpic_relocate_section () is going to generating
the relocation for each section, it will find some relocations are
lost.
So my question is: Is it possible to add a backend hook, which can be
used by port, like bfin, to tell ld not optimize away CIE entry even
there is no FDE use it? Or is there a better way to fix it?
Thanks,
Jie