[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/16563] New: Corrupt .eh-frame section created when linking LTO a
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/16563] New: Corrupt .eh-frame section created when linking LTO and non-LTO objects |
Date: |
Wed, 12 Feb 2014 12:03:00 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=16563
Bug ID: 16563
Summary: Corrupt .eh-frame section created when linking LTO and
non-LTO objects
Product: binutils
Version: 2.25 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: nickc at redhat dot com
Created attachment 7405
--> https://sourceware.org/bugzilla/attachment.cgi?id=7405&action=edit
Files needed to reproduce problem
Linking together LTO and non-LTO objects can result in a corrupt
.eh_frame section. To reproduce this run the following command on the
uploaded x86_64 object files:
% g++ -o broken.exe -O0 -flto -fno-fat-lto-objects -flto-partition=none \
a.o b.o -Wl,--no-demangle
Then examine the contents of the .eh_frame section with:
% readelf -w broken.exe > /dev/null
Warning: Invalid CIE pointer 0xfffffccc in FDE at 0x000040
The a.o and b.o object files were produced as follows (sources also
uploaded):
% g++ -c -O0 -flto -fno-fat-lto-objects a.cpp
% g++ -c -O0 b.cpp
Note - compiling both a.cpp and b.cpp with LTO results in a working
binary. So does compiling them both without LTO. Also if the
-Wl,-traditional linker command line option is included on the g++
command line then the link works. (This is because traditional linking
disables the optimization of the .eh_frame section).
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/16563] New: Corrupt .eh-frame section created when linking LTO and non-LTO objects,
nickc at redhat dot com <=