bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16563] Corrupt .eh-frame section created when linking LTO and no


From: amodra at gmail dot com
Subject: [Bug ld/16563] Corrupt .eh-frame section created when linking LTO and non-LTO objects
Date: Wed, 13 Aug 2014 14:46:27 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16563

--- Comment #4 from Alan Modra <amodra at gmail dot com> ---
There are a couple of things going on here, but the "Invalid CIE pointer" is a
readelf bug I'd say.  There's nothing prohibiting a FDE to be located before
its CIE.  The .eh_frame cie_id is a signed relative offset (gcc's unwinder
treats it that way), and .debug_frame cie_id is section relative.  So readelf
ought to be able to handle this ordering.

Of course it's unexpected to find CIEs and FDEs like this.  The reason appears
to be that the elf-eh-frame.c code finds a duplicate CIE in a.o and b.o, and
therefore causes the b.o copy to be removed and some b.o FDE's then use an a.o
CIE.  That's all quite nornal, use the CIE the elf-eh-frame.c sees as
"earlier".
The problem is that a.o's lto recompiled object actually gets linked into the
output .eh_frame *after* b.o's .eh_frame.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]