This is the mail archive of the binutils@sourceware.org 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 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


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