diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-19 17:50:23 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2006-01-19 17:50:23 +0000 |
commit | b91bb097caad9913964b92fd9751241f559cc9e6 (patch) | |
tree | 56f76ddc652e1032cd4c3e4ea62f6635c026565a | |
parent | 010e71eb372b624317dfa2b6d7f353d38f172621 (diff) |
Remove HAVE_ELF
36 files changed, 39 insertions, 178 deletions
@@ -151,10 +151,8 @@ $(top_builddir)lib/interp.c: $(Q)$(INSTALL) -d $(dir $@) $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@ $(Q)echo "#include <features.h>" >> $@ - $(Q)echo "#ifdef __HAVE_ELF__" >> $@ $(Q)echo "const char __dl_ldso__[] __attribute__ ((section " \ "(\".interp\"))) =\""$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)"\";" >> $@ - $(Q)echo "#endif" >> $@ $(interp): $(top_builddir)lib/interp.c $(compile.c) @@ -169,11 +167,7 @@ $(libc): $(headers_dep): @cd $(top_builddir); $(MAKE) headers -#ifeq ($(HAVE_ELF),y) CRT=crt1 -#else -#CRT=crt0 -#endif ifeq ($(HAVE_SHARED),y) CRTS=$(top_builddir)lib/$(CRT).o $(top_builddir)lib/S$(CRT).o @@ -432,10 +432,6 @@ ifneq ($(DOASSERTS),y) CFLAGS+=-DNDEBUG endif -ifneq ($(strip $(C_SYMBOL_PREFIX)),"") -CFLAGS+=-D__SYMBOL_PREFIX=1 -endif - # moved from ldso/{ldso,libdl} # BEWARE!!! At least mips* will die if -O0 is used!!! ifeq ($(TARGET_ARCH),mips) diff --git a/debian/config b/debian/config index 8ec73e231..301f7b31b 100644 --- a/debian/config +++ b/debian/config @@ -25,7 +25,6 @@ # # Target Architecture Features and Options # -HAVE_ELF=y # ARCH_SUPPORTS_LITTLE_ENDIAN is not set TARGET_ARCH="none" # ARCH_LITTLE_ENDIAN is not set @@ -53,7 +52,6 @@ UCLIBC_HAS_FLOATS=y HAS_FPU=y DO_C99_MATH=y KERNEL_SOURCE="/usr/src/linux" -C_SYMBOL_PREFIX="" HAVE_DOT_CONFIG=y # diff --git a/docs/PORTING b/docs/PORTING index 469effbdb..5c1a3989a 100644 --- a/docs/PORTING +++ b/docs/PORTING @@ -11,7 +11,7 @@ you are hacking on. - Initially you will want to disable shared libraries, since making the shared library loader work requires you first have basic architecture support working. Thus you should add HAVE_NO_SHARED and ARCH_HAS_NO_LDSO - to Config.ARCH's HAVE_ELF + to Config.ARCH's TARGET_ARCH ==================== === libc sysdeps === diff --git a/extra/Configs/Config.alpha b/extra/Configs/Config.alpha index 47545ce5d..1b5768bb7 100644 --- a/extra/Configs/Config.alpha +++ b/extra/Configs/Config.alpha @@ -3,18 +3,14 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - select ARCH_HAS_MMU - select ARCH_HAS_NO_LDSO - select UCLIBC_HAS_LFS - bool - default y - config ARCH_SUPPORTS_LITTLE_ENDIAN bool default y config TARGET_ARCH + select ARCH_HAS_MMU + select ARCH_HAS_NO_LDSO + select UCLIBC_HAS_LFS default "alpha" config ARCH_CFLAGS diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm index fc775ba23..62ebf73db 100644 --- a/extra/Configs/Config.arm +++ b/extra/Configs/Config.arm @@ -3,10 +3,6 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - bool - default y - config TARGET_ARCH default "arm" diff --git a/extra/Configs/Config.bfin b/extra/Configs/Config.bfin index 986351088..c65b5fa40 100644 --- a/extra/Configs/Config.bfin +++ b/extra/Configs/Config.bfin @@ -4,20 +4,12 @@ # config TARGET_ARCH - default "bfin" - -config HAVE_ELF - bool select ARCH_HAS_NO_MMU select ARCH_LITTLE_ENDIAN - default y + default "bfin" config ARCH_CFLAGS string config LIBGCC_CFLAGS string - -config HAVE_ELF - bool - default y diff --git a/extra/Configs/Config.cris b/extra/Configs/Config.cris index c8fc23e73..07f2cbe77 100644 --- a/extra/Configs/Config.cris +++ b/extra/Configs/Config.cris @@ -3,10 +3,6 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - bool - default y - config TARGET_ARCH default "cris" diff --git a/extra/Configs/Config.e1 b/extra/Configs/Config.e1 index 841ac9b9b..d134a0c83 100644 --- a/extra/Configs/Config.e1 +++ b/extra/Configs/Config.e1 @@ -3,17 +3,13 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - select ARCH_HAS_NO_MMU - select HAVE_NO_SHARED - bool - default n - config ARCH_SUPPORTS_BIG_ENDIAN bool default y config TARGET_ARCH + select ARCH_HAS_NO_MMU + select HAVE_NO_SHARED default "e1" config ARCH_E1 diff --git a/extra/Configs/Config.frv b/extra/Configs/Config.frv index ee523b8b9..f9ee6ab67 100644 --- a/extra/Configs/Config.frv +++ b/extra/Configs/Config.frv @@ -3,14 +3,10 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - bool +config TARGET_ARCH select UCLIBC_HAS_FPU select ARCH_BIG_ENDIAN select ARCH_HAS_NO_MMU - default y - -config TARGET_ARCH string default "frv" @@ -19,7 +15,3 @@ config ARCH_CFLAGS config LIBGCC_CFLAGS string - -config HAVE_DOT_HIDDEN - bool - default y diff --git a/extra/Configs/Config.h8300 b/extra/Configs/Config.h8300 index 57fbe8fdd..c9b74d87e 100644 --- a/extra/Configs/Config.h8300 +++ b/extra/Configs/Config.h8300 @@ -3,11 +3,6 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - bool - select ARCH_HAS_NO_MMU - default y - config ARCH_SUPPORTS_BIG_ENDIAN bool default y @@ -17,6 +12,7 @@ config ARCH_SUPPORTS_LITTLE_ENDIAN default y config TARGET_ARCH + select ARCH_HAS_NO_MMU default "h8300" choice diff --git a/extra/Configs/Config.hppa b/extra/Configs/Config.hppa index c198e18d6..2d91b613f 100644 --- a/extra/Configs/Config.hppa +++ b/extra/Configs/Config.hppa @@ -4,15 +4,11 @@ # config TARGET_ARCH - default "hppa" - -config HAVE_ELF - bool select ARCH_HAS_MMU select HAS_NO_THREADS select ARCH_HAS_NO_LDSO select HAVE_NO_SSP - default y + default "hppa" config ARCH_SUPPORTS_BIG_ENDIAN bool diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386 index 14f575e89..7fbce37f5 100644 --- a/extra/Configs/Config.i386 +++ b/extra/Configs/Config.i386 @@ -3,12 +3,8 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - bool - select ARCH_HAS_MMU - default y - config TARGET_ARCH + select ARCH_HAS_MMU string default "i386" diff --git a/extra/Configs/Config.i960 b/extra/Configs/Config.i960 index 336b3d69a..17eb6a2cc 100644 --- a/extra/Configs/Config.i960 +++ b/extra/Configs/Config.i960 @@ -4,13 +4,9 @@ # config TARGET_ARCH - default "i960" - -config HAVE_ELF - bool select ARCH_HAS_NO_MMU select HAS_NO_THREADS - default n + default "i960" config ARCH_SUPPORTS_LITTLE_ENDIAN bool diff --git a/extra/Configs/Config.m68k b/extra/Configs/Config.m68k index 056172fff..abb9335cc 100644 --- a/extra/Configs/Config.m68k +++ b/extra/Configs/Config.m68k @@ -6,10 +6,6 @@ config TARGET_ARCH default "m68k" -config HAVE_ELF - bool - default y - config ARCH_SUPPORTS_BIG_ENDIAN bool default y @@ -20,7 +16,3 @@ config ARCH_CFLAGS config LIBGCC_CFLAGS string - -config HAVE_ELF - bool - default y diff --git a/extra/Configs/Config.microblaze b/extra/Configs/Config.microblaze index 4eb2e3d4a..c4fe727b6 100644 --- a/extra/Configs/Config.microblaze +++ b/extra/Configs/Config.microblaze @@ -4,12 +4,8 @@ # config TARGET_ARCH - default "microblaze" - -config HAVE_ELF - bool select ARCH_HAS_NO_MMU - default y + default "microblaze" config ARCH_SUPPORTS_BIG_ENDIAN bool diff --git a/extra/Configs/Config.mips b/extra/Configs/Config.mips index bca298a69..bc14230b9 100644 --- a/extra/Configs/Config.mips +++ b/extra/Configs/Config.mips @@ -6,10 +6,6 @@ config TARGET_ARCH default "mips" -config HAVE_ELF - bool - default y - config ARCH_CFLAGS string default "-mno-split-addresses" diff --git a/extra/Configs/Config.nios b/extra/Configs/Config.nios index 1c64234ed..ed862951d 100644 --- a/extra/Configs/Config.nios +++ b/extra/Configs/Config.nios @@ -4,14 +4,10 @@ # config TARGET_ARCH - default "nios" - -config HAVE_ELF - bool select ARCH_HAS_NO_MMU select ARCH_LITTLE_ENDIAN select HAVE_NO_PIC - default y + default "nios" config ARCH_CFLAGS string diff --git a/extra/Configs/Config.nios2 b/extra/Configs/Config.nios2 index a57750e79..1a98e413b 100644 --- a/extra/Configs/Config.nios2 +++ b/extra/Configs/Config.nios2 @@ -4,14 +4,10 @@ # config TARGET_ARCH - default "nios2" - -config HAVE_ELF - bool select ARCH_HAS_NO_MMU select ARCH_LITTLE_ENDIAN select HAVE_NO_PIC - default y + default "nios2" config ARCH_CFLAGS string diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc index b0ee1a45b..7129f0012 100644 --- a/extra/Configs/Config.powerpc +++ b/extra/Configs/Config.powerpc @@ -4,12 +4,8 @@ # config TARGET_ARCH - default "powerpc" - -config HAVE_ELF - bool select ARCH_HAS_MMU - default y + default "powerpc" config ARCH_SUPPORTS_BIG_ENDIAN bool diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh index fa2159636..2443e02f0 100644 --- a/extra/Configs/Config.sh +++ b/extra/Configs/Config.sh @@ -6,20 +6,12 @@ config TARGET_ARCH default "sh" -config HAVE_ELF - bool - default y - config ARCH_CFLAGS string config LIBGCC_CFLAGS string -config HAVE_DOT_HIDDEN - bool - default y - config ARCH_SUPPORTS_BIG_ENDIAN bool default y diff --git a/extra/Configs/Config.sh64 b/extra/Configs/Config.sh64 index 3c3ed9d8e..7bdbe5685 100644 --- a/extra/Configs/Config.sh64 +++ b/extra/Configs/Config.sh64 @@ -6,20 +6,12 @@ config TARGET_ARCH default "sh64" -config HAVE_ELF - bool - default y - config ARCH_CFLAGS string config LIBGCC_CFLAGS string -config HAVE_DOT_HIDDEN - bool - default y - config ARCH_SUPPORTS_BIG_ENDIAN bool default y diff --git a/extra/Configs/Config.sparc b/extra/Configs/Config.sparc index e169d48a7..e5319e9e9 100644 --- a/extra/Configs/Config.sparc +++ b/extra/Configs/Config.sparc @@ -6,10 +6,6 @@ config TARGET_ARCH default "sparc" -config HAVE_ELF - bool - default y - config ARCH_SUPPORTS_BIG_ENDIAN bool default y diff --git a/extra/Configs/Config.v850 b/extra/Configs/Config.v850 index 2f900fc54..93755878e 100644 --- a/extra/Configs/Config.v850 +++ b/extra/Configs/Config.v850 @@ -4,13 +4,9 @@ # config TARGET_ARCH - default "v850" - -config HAVE_ELF - bool select ARCH_HAS_NO_MMU select HAVE_NO_PIC - default y + default "v850" config ARCH_SUPPORTS_LITTLE_ENDIAN bool diff --git a/extra/Configs/Config.x86_64 b/extra/Configs/Config.x86_64 index 68002268d..847fed69f 100644 --- a/extra/Configs/Config.x86_64 +++ b/extra/Configs/Config.x86_64 @@ -3,13 +3,9 @@ # see extra/config/Kconfig-language.txt # -config HAVE_ELF - bool +config TARGET_ARCH select ARCH_HAS_MMU select UCLIBC_HAS_LFS - default y - -config TARGET_ARCH string default "x86_64" diff --git a/include/libc-internal.h b/include/libc-internal.h index 9f1c36fbb..21280e4af 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -22,8 +22,6 @@ #include <features.h> #include <bits/uClibc_arch_features.h> -#define HAVE_ELF 1 - #ifdef __UCLIBC_NO_UNDERSCORES__ # define NO_UNDERSCORES #else @@ -197,35 +195,29 @@ #endif /* __ASSEMBLER__ */ -/* When a reference to SYMBOL is encountered, the linker will emit a - warning message MSG. */ -#ifdef HAVE_ELF - /* We want the .gnu.warning.SYMBOL section to be unallocated. */ -# define __make_section_unallocated(section_string) \ +#define __make_section_unallocated(section_string) \ asm (".section " section_string "\n\t.previous"); /* Tacking on "\n\t#" to the section name makes gcc put it's bogus section attributes on what looks like a comment to the assembler. */ -# ifdef __sparc__ //HAVE_SECTION_QUOTES -# define __sec_comment "\"\n\t#\"" -# else -# define __sec_comment "\n\t#" -# endif -# ifdef __cris__ -# define link_warning(symbol, msg) -# else -# define link_warning(symbol, msg) \ +#ifdef __sparc__ //HAVE_SECTION_QUOTES +# define __sec_comment "\"\n\t#\"" +#else +# define __sec_comment "\n\t#" +#endif + +/* When a reference to SYMBOL is encountered, the linker will emit a + warning message MSG. */ +#ifdef __cris__ +# define link_warning(symbol, msg) +#else +# define link_warning(symbol, msg) \ __make_section_unallocated (".gnu.warning." #symbol) \ static const char __evoke_link_warning_##symbol[] \ __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \ = msg; -# endif -#else /* HAVE_ELF */ -# define link_warning(symbol, msg) \ - asm (".stabs \"" msg "\",30,0,0,0\n\t" \ - ".stabs \"" __USER_LABEL_PREFIX__ #symbol "\",1,0,0,0\n"); -#endif /* HAVE_ELF */ +#endif #ifndef weak_function /* If we do not have the __attribute__ ((weak)) syntax, there is no way we diff --git a/libc/sysdeps/linux/h8300/crt0.S b/libc/sysdeps/linux/h8300/crt0.S index a593b88e2..ebdca18e5 100644 --- a/libc/sysdeps/linux/h8300/crt0.S +++ b/libc/sysdeps/linux/h8300/crt0.S @@ -56,12 +56,8 @@ __exit: */ empty_func: rts -#if defined(__HAVE_ELF__) .weak atexit atexit = empty_func -#else - .set atexit,empty_func -#endif /* Define a symbol for the first piece of initialized data. */ diff --git a/libc/sysdeps/linux/h8300/vfork.S b/libc/sysdeps/linux/h8300/vfork.S index 343bb0183..4156fae17 100644 --- a/libc/sysdeps/linux/h8300/vfork.S +++ b/libc/sysdeps/linux/h8300/vfork.S @@ -14,9 +14,7 @@ .align 2 .globl _errno .globl _vfork -#if defined __HAVE_ELF__ .type vfork,@function -#endif _vfork: mov.l @sp+, er1 sub.l er0,er0 diff --git a/libc/sysdeps/linux/i960/README b/libc/sysdeps/linux/i960/README index e1ca11f9a..185fe2572 100644 --- a/libc/sysdeps/linux/i960/README +++ b/libc/sysdeps/linux/i960/README @@ -16,8 +16,7 @@ prepended underscore -------------------- As the i960 compiler prepends an underscore to symbols, it is critical that -the Config file define __C_SYMBOL_PREFIX__ as - __C_SYMBOL_PREFIX__ = _ +bits/uClibc_arch_features.h undefines __UCLIBC_NO_UNDERSCORES__ to make sure that underscores are applied to symbol names when needed. diff --git a/libc/sysdeps/linux/m68k/Makefile.arch b/libc/sysdeps/linux/m68k/Makefile.arch index 1ce72a61a..a1ded80f2 100644 --- a/libc/sysdeps/linux/m68k/Makefile.arch +++ b/libc/sysdeps/linux/m68k/Makefile.arch @@ -9,8 +9,4 @@ CSRC := ptrace.c brk.c __syscall_error.c syscall.c SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S -ifneq ($(HAVE_ELF),y) -ARCH_HEADERS := float.h -endif - include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/m68k/vfork.S b/libc/sysdeps/linux/m68k/vfork.S index ec319d077..58564f765 100644 --- a/libc/sysdeps/linux/m68k/vfork.S +++ b/libc/sysdeps/linux/m68k/vfork.S @@ -18,9 +18,7 @@ .align 2 .globl errno .globl vfork -#ifdef __HAVE_ELF__ .type vfork,@function -#endif vfork: movl %sp@+, %a1 /* save the return address for later */ diff --git a/libc/sysdeps/linux/nios/vfork.S b/libc/sysdeps/linux/nios/vfork.S index 3ac3da9b3..2479fe752 100644 --- a/libc/sysdeps/linux/nios/vfork.S +++ b/libc/sysdeps/linux/nios/vfork.S @@ -23,9 +23,7 @@ .text .align 2 .globl vfork -#if defined __HAVE_ELF__ .type vfork,@function -#endif vfork: MOVIP %g1, __NR_vfork trap 63 diff --git a/libc/sysdeps/linux/sh/clone.S b/libc/sysdeps/linux/sh/clone.S index 80c623b81..1806313e0 100644 --- a/libc/sysdeps/linux/sh/clone.S +++ b/libc/sysdeps/linux/sh/clone.S @@ -25,7 +25,7 @@ #include <bits/errno.h> -#if defined __HAVE_ELF__ && defined __HAVE_SHARED__ +#ifdef __HAVE_SHARED__ #define PLTJMP(_x) _x##@PLT #else #define PLTJMP(_x) _x @@ -98,7 +98,7 @@ clone: /* we are done, passing the return value through r0 */ mov.l .L1, r1 -#if defined __HAVE_ELF__ && defined __HAVE_SHARED__ +#ifdef __HAVE_SHARED__ mov.l r12, @-r15 sts.l pr, @-r15 mov r0, r4 diff --git a/libc/sysdeps/linux/sh/setjmp.S b/libc/sysdeps/linux/sh/setjmp.S index bb87ff0fb..3296c2ba9 100644 --- a/libc/sysdeps/linux/sh/setjmp.S +++ b/libc/sysdeps/linux/sh/setjmp.S @@ -77,7 +77,7 @@ __sigsetjmp_intern: mov.l r9, @-r4 mov.l r8, @-r4 -#if defined __HAVE_ELF__ && defined __HAVE_SHARED__ +#ifdef __HAVE_SHARED__ mov.l .LG, r2 mova .LG, r0 add r0, r2 diff --git a/libc/sysdeps/linux/sh/syscall_error.S b/libc/sysdeps/linux/sh/syscall_error.S index 7115120db..1764ebfc8 100644 --- a/libc/sysdeps/linux/sh/syscall_error.S +++ b/libc/sysdeps/linux/sh/syscall_error.S @@ -3,7 +3,7 @@ __syscall_error: /* Call errno_location, store '-r4' in errno and return -1 */ mov.l r12, @-r15 sts.l pr, @-r15 -#if defined __HAVE_ELF__ && defined __HAVE_SHARED__ +#ifdef __HAVE_SHARED__ mova .LG, r0 mov.l .LG, r12 add r0, r12 @@ -27,7 +27,7 @@ __syscall_error: .align 4 -#if defined __HAVE_ELF__ && defined __HAVE_SHARED__ +#ifdef __HAVE_SHARED__ 1: .long __errno_location@GOT .LG: .long _GLOBAL_OFFSET_TABLE_ #else diff --git a/libpthread/linuxthreads.old/attr.c b/libpthread/linuxthreads.old/attr.c index e5f110b0e..287f2636d 100644 --- a/libpthread/linuxthreads.old/attr.c +++ b/libpthread/linuxthreads.old/attr.c @@ -49,7 +49,7 @@ int pthread_attr_init(pthread_attr_t *attr) /* uClibc: leave out this for now. */ #if DO_PTHREAD_VERSIONING_WITH_UCLIBC -#if defined __HAVE_ELF__ && defined __PIC__ && defined DO_VERSIONING +#if defined __PIC__ && defined DO_VERSIONING default_symbol_version (__pthread_attr_init_2_1, pthread_attr_init, GLIBC_2.1); int __pthread_attr_init_2_0(pthread_attr_t *attr) |