This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Fix ARM crti.o/crtn.o unwind tables issue
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-ports at sourceware dot org
- Date: Tue, 30 Jun 2009 20:13:36 +0000 (UTC)
- Subject: Fix ARM crti.o/crtn.o unwind tables issue
I've applied this patch, a followup fix to the ARM backtrace changes, to
fix an issue building crti.o and crtn.o with unwind tables enabled by
default. I quote Paul's description of the issue and fix:
The crti.o and crtn.o objects are generated by compiling a function, then
splitting the assembly in two. Some ARM EABI toolchains enable unwinding
tables by default. This adds additional directives to the assembly which break
when post-processed into separate files.
The patch below fixes this by disabling unwinding tables for these files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index ebc4e30..47aa61d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2009-06-30 Paul Brook <paul@codesourcery.com>
+
+ * sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add
+ -fno-asynchronous-unwind-tables -fno-unwind-tables.
+ (CFLAGS-pt-initfini.s): Ditto.
+
2009-06-25 Nathan Froyd <froydnj@codesourcery.com>
* sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout,
diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile
index 890d1d9..05aede6 100644
--- a/sysdeps/arm/eabi/Makefile
+++ b/sysdeps/arm/eabi/Makefile
@@ -3,6 +3,7 @@ aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
aeabi_memmove aeabi_memset
+CFLAGS-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables
sysdep_routines += $(aeabi_constants) $(aeabi_routines)
static-only-routines += $(aeabi_constants)
@@ -24,3 +25,7 @@ endif
ifeq ($(subdir),math)
$(objpfx)libm.so: $(elfobjdir)/ld.so
endif
+
+ifeq ($(subdir),nptl)
+CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables
+endif
--
Joseph S. Myers
joseph@codesourcery.com