http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54568
Bug #: 54568 Summary: Unused codes in unwind-dw2-fde.c on PT_GNU_EH_FRAME targets Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: hjl.to...@gmail.com From http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24724#c15 -- On a system whose linker supports --eh-frame-hdr, we will use the version of _Unwind_Find_FDE in unwind-dw2-fde-dip.c. It will override the version in unwind-dw2-fde.c by renaming it via #define. This file is selected by libgcc/config/t-eh-dw2-dip. It will still call the version of _Unwind_Find_FDE, but that function will only look through files registered by __register_frame_info_bases. __register_frame_info_bases is called by crtstuff.c, but it is only called on systems whose linker does not support --eh-frame-hdr. -- On PT_GNU_EH_FRAME targets, even __register_frame_info_bases isn't defined/used, we still include unwind-dw2-fde.c and call its _Unwind_Find_FDE as _Unwind_Find_registered_FDE. Should we skip the whole thing?