[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] ARM crtn.o problems



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. 
Other targets (e.g. i386) already do something similar.

Tested on arm-none-linux-gnueabi.
Please commit for me if approved.

Paul

2009-06-30  Paul Brook <paul@xxxxxxxxxxxxxxxx>

	* sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add
	-fno-asynchronous-unwind-tables -fno-unwind-tables.
	(CFLAGS-pt-initfini.s): Ditto.

Index: sysdeps/arm/eabi/Makefile
===================================================================
--- sysdeps/arm/eabi/Makefile	(revision 254588)
+++ sysdeps/arm/eabi/Makefile	(working copy)
@@ -1,6 +1,7 @@
 ifeq ($(subdir),csu)
 arm_aeabi_routines = aeabi_atexit aeabi_memclr aeabi_memcpy \
 	aeabi_memmove aeabi_memset
+CFLAGS-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables
 
 sysdep_routines += $(arm_aeabi_routines)
 
@@ -22,3 +23,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