This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
--eh-frame-hdr must never fail
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: 03 Jul 2007 07:51:05 -0700
- Subject: --eh-frame-hdr must never fail
The --eh-frame-hdr option directs the program linker to create a table
of FDEs. This table is used by gcc's exception handler library to
locate FDEs at runtime. The gcc configure script tests the linker to
see whether it supports the --eh-frame-hdr option. If it does not,
gcc generates code to register FDEs at runtime. If it does, gcc
assumes that it will be able to use the table created by the linker.
This means that if the linker ever fails to create the table, or if
the table is incomplete, then exception handling will fail at runtime.
Unfortunately if you look at the code in bfd/elf-eh-frame.c, you will
see that there a number of cases in which the table will silently fail
to include some of the FDEs. I assume that none of these case arise
in practice. But a silent failure is troubling.
I'm not sure what to do about this. I just wanted to mention it in
case anybody has an idea.
Ian