$(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)
$(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
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)
#
# Target Architecture Features and Options
#
-HAVE_ELF=y
# ARCH_SUPPORTS_LITTLE_ENDIAN is not set
TARGET_ARCH="none"
# ARCH_LITTLE_ENDIAN is not set
HAS_FPU=y
DO_C99_MATH=y
KERNEL_SOURCE="/usr/src/linux"
-C_SYMBOL_PREFIX=""
HAVE_DOT_CONFIG=y
#
- 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 ===
# 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
# see extra/config/Kconfig-language.txt
#
-config HAVE_ELF
- bool
- default y
-
config TARGET_ARCH
default "arm"
#
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
# see extra/config/Kconfig-language.txt
#
-config HAVE_ELF
- bool
- default y
-
config TARGET_ARCH
default "cris"
# 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
# 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"
config LIBGCC_CFLAGS
string
-
-config HAVE_DOT_HIDDEN
- bool
- default y
# 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
default y
config TARGET_ARCH
+ select ARCH_HAS_NO_MMU
default "h8300"
choice
#
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
# 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"
#
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
config TARGET_ARCH
default "m68k"
-config HAVE_ELF
- bool
- default y
-
config ARCH_SUPPORTS_BIG_ENDIAN
bool
default y
config LIBGCC_CFLAGS
string
-
-config HAVE_ELF
- bool
- default y
#
config TARGET_ARCH
- default "microblaze"
-
-config HAVE_ELF
- bool
select ARCH_HAS_NO_MMU
- default y
+ default "microblaze"
config ARCH_SUPPORTS_BIG_ENDIAN
bool
config TARGET_ARCH
default "mips"
-config HAVE_ELF
- bool
- default y
-
config ARCH_CFLAGS
string
default "-mno-split-addresses"
#
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
#
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
#
config TARGET_ARCH
- default "powerpc"
-
-config HAVE_ELF
- bool
select ARCH_HAS_MMU
- default y
+ default "powerpc"
config ARCH_SUPPORTS_BIG_ENDIAN
bool
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
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
config TARGET_ARCH
default "sparc"
-config HAVE_ELF
- bool
- default y
-
config ARCH_SUPPORTS_BIG_ENDIAN
bool
default y
#
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
# 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"
#include <features.h>
#include <bits/uClibc_arch_features.h>
-#define HAVE_ELF 1
-
#ifdef __UCLIBC_NO_UNDERSCORES__
# define NO_UNDERSCORES
#else
#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
*/
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. */
.align 2
.globl _errno
.globl _vfork
-#if defined __HAVE_ELF__
.type vfork,@function
-#endif
_vfork:
mov.l @sp+, er1
sub.l er0,er0
--------------------
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.
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
.align 2
.globl errno
.globl vfork
-#ifdef __HAVE_ELF__
.type vfork,@function
-#endif
vfork:
movl %sp@+, %a1 /* save the return address for later */
.text
.align 2
.globl vfork
-#if defined __HAVE_ELF__
.type vfork,@function
-#endif
vfork:
MOVIP %g1, __NR_vfork
trap 63
#include <bits/errno.h>
-#if defined __HAVE_ELF__ && defined __HAVE_SHARED__
+#ifdef __HAVE_SHARED__
#define PLTJMP(_x) _x##@PLT
#else
#define PLTJMP(_x) _x
/* 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
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
/* 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
.align 4
-#if defined __HAVE_ELF__ && defined __HAVE_SHARED__
+#ifdef __HAVE_SHARED__
1: .long __errno_location@GOT
.LG: .long _GLOBAL_OFFSET_TABLE_
#else
/* 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)