From 23656d08e2055c62b09138f9330c15f088d74127 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 17 Jan 2008 19:11:18 +0000 Subject: A patch from our Blackfin repository, originally from Jie Zhang. This fixes a problem where the linker was trying to use the wrong symbol name for the init function. Define SYMBOL_PREFIX as _ in Rules.mak for h8300, bfin, i960, microblaze, and v850. Add -D__UCLIBC_UNDERSCORES__ in CFLAGS for targets which define SYMBOL_PREFIX as _. Remove defines and undefs from uClibc_arch_features.h of each target. Add $(SYMBOL_PREFIX) to __uClibc_init when passed by ld option -init. --- libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/arm/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/common/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/cris/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/e1/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/frv/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/i386/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/i960/README | 5 +++-- libc/sysdeps/linux/i960/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/mips/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/nios/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/sh/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/v850/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/vax/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h | 3 --- libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h | 3 --- 27 files changed, 3 insertions(+), 80 deletions(-) (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h b/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h index 8ecd1823a..e62375caa 100644 --- a/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #define __UCLIBC_SLIGHTLY_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #undef __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h index bb63a2ef3..85c9adb8a 100644 --- a/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #define __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h b/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h index 993fbf821..679be3038 100644 --- a/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h @@ -21,9 +21,6 @@ /* does your target have to worry about older [gs]etrlimit() ? */ #undef __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h b/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h index eb622766a..39e71c918 100644 --- a/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#define __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/common/bits/uClibc_arch_features.h b/libc/sysdeps/linux/common/bits/uClibc_arch_features.h index a671b4262..66186edbb 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/common/bits/uClibc_arch_features.h @@ -23,9 +23,6 @@ /* does your target have to worry about older [gs]etrlimit() ? */ #undef __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h b/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h index 98c1d0dbe..bdd338792 100644 --- a/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #define __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h b/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h index 6bf166fb2..f4adaf5ad 100644 --- a/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h b/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h index 6bf166fb2..f4adaf5ad 100644 --- a/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h b/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h index 701790f7a..b0d032d30 100644 --- a/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#define __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h b/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h index aade0083c..2c04f1b77 100644 --- a/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h b/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h index fdc6232b2..f4730d987 100644 --- a/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h @@ -21,9 +21,6 @@ /* this is only an issue on i386 where linux < 2.3.25, so we just assume it works ... */ #undef __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/i960/README b/libc/sysdeps/linux/i960/README index 8c81f8a2e..751673508 100644 --- a/libc/sysdeps/linux/i960/README +++ b/libc/sysdeps/linux/i960/README @@ -16,8 +16,9 @@ prepended underscore -------------------- As the i960 compiler prepends an underscore to symbols, it is critical that -bits/uClibc_arch_features.h defines __UCLIBC_UNDERSCORES__ -to make sure that underscores are applied to symbol names when needed. +Rules.mak defines SYMBOL_PREFIX as _, such that -D__UCLIBC_UNDERSCORES__ +is added to CFLAGS to make sure that underscores are applied to symbol +names when needed. __va_copy in va-i960.h diff --git a/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h b/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h index 317bc0d6c..cd6bcd9d0 100644 --- a/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #define __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#define __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h index da3347be0..953279e73 100644 --- a/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h b/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h index f04a06d8f..b5ef48f4b 100644 --- a/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h @@ -24,9 +24,6 @@ /* does your target have to worry about older [gs]etrlimit() ? */ #define __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h b/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h index 172f6c1e2..f4adaf5ad 100644 --- a/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#define __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h b/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h index eb926fcc0..42a7c4526 100644 --- a/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #undef __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h b/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h index 6bf166fb2..f4adaf5ad 100644 --- a/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h b/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h index 6bf166fb2..f4adaf5ad 100644 --- a/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h b/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h index 53adc5cc7..a3f11df31 100644 --- a/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h @@ -21,9 +21,6 @@ /* this is only an issue on i386 where linux < 2.3.35, so we just assume it works ... */ #undef __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h b/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h index 9cf3d0dc2..411e811ce 100644 --- a/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h @@ -24,9 +24,6 @@ /* does your target have to worry about older [gs]etrlimit() ? */ #define __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h index 8d2fca254..1e8aa593f 100644 --- a/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h b/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h index 62d13ffe5..41d3e7c3d 100644 --- a/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h b/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h index 172f6c1e2..f4adaf5ad 100644 --- a/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h @@ -18,9 +18,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#define __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h b/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h index 9b8cd592c..eda49b81c 100644 --- a/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h index b71d7ab69..e3e2c8332 100644 --- a/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h @@ -17,9 +17,6 @@ /* does your target have a broken create_module() ? */ #undef __UCLIBC_BROKEN_CREATE_MODULE__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ diff --git a/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h b/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h index d01e77f5f..142aacd53 100644 --- a/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h +++ b/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h @@ -20,9 +20,6 @@ /* does your target have to worry about older [gs]etrlimit() ? */ #undef __UCLIBC_HANDLE_OLDER_RLIMIT__ -/* does your target prefix all symbols with an _ ? */ -#undef __UCLIBC_UNDERSCORES__ - /* does your target have an asm .set ? */ #define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ -- cgit v1.2.3