This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
libffi/configure.ac does not correctly determine writable eh_frame
- From: Ian Lance Taylor <iant at google dot com>
- To: libffi-discuss at sourceware dot org
- Cc: doko at ubuntu dot com
- Date: Mon, 10 Jan 2011 13:47:20 -0800
- Subject: libffi/configure.ac does not correctly determine writable eh_frame
In the version of libffi distributed with gcc, I see this in
configure.ac:
echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
libffi_cv_ro_eh_frame=yes
elif grep '.section.*eh_frame.*#alloc' conftest.c \
| grep -v '#write' > /dev/null; then
libffi_cv_ro_eh_frame=yes
fi
fi
This does not work with current gcc. When that code is compiled, no
.eh_frame section is generated. Therefore the configure script assumes
that a writable .eh_frame section is appropriate, even when it is not.
This was detected due to a bug in gold; see http://gcc.gnu.org/PR47248
for more details. However, this issue in libffi should be fixed
independently of the gold bug fix.
Ian