]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools IA32/X64: prevent .eh_frame sections from being generated
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 13 Aug 2015 06:02:00 +0000 (06:02 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Thu, 13 Aug 2015 06:02:00 +0000 (06:02 +0000)
commit26ecc55c027d77ebe6d73cb26dd93f814639a279
tree3361ceb314dd10769a797e4c0bb01c576104d5af
parented5d1532f9f04fd7e463920787cc4209f72f7602
BaseTools IA32/X64: prevent .eh_frame sections from being generated

After the recent GNU linker script changes, the following warning is
emitted many times during the OVMF build:

BFD: <...>: warning: Empty loadable segment detected, is this intentional ?

This is caused by the fact that, now that the section layout has changed
somewhat, the .eh_frame section is assigned an ELF segment of its own,
which ends up with no contents at all after we strip the .eh_frame
section from the output. (Note that the program headers that contain the
segment information are completely irrelevant to us since the PE/COFF
conversion does not rely on them.)

Since we only retain the .eh_frame data for external debugging, and not
for things like stack unwinding or generating backtraces at runtime, we
can remedy the situation by passing -fno-asynchronous-unwind-tables on
the GCC command line. This option instructs the compiler to emit the
unwind data into a debug section called .debug_frame instead of into
.eh_frame.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18217 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Conf/tools_def.template