2012-01-07 Ulrich Drepper <drepper@gmail.com>
+ [BZ #13551]
+ * Makeconfig: Remove all but ELF support including AIX support.
+ * Makerules: Likewise.
+ * config.h.in: Likewise.
+ * config.make.in: Likewise.
+ * configure: Likewise.
+ * configure.in: Likewise.
+ * csu/Makefile: Likewise.
+ * csu/version.c: Likewise.
+ * debug/Makefile: Likewise.
+ * dlfcn/Makefile: Likewise.
+ * elf/Makefile: Likewise.
+ * extra-lib.mk: Likewise.
+ * iconv/Makefile: Likewise.
+ * include/libc-symbols.h: Likewise.
+ * include/shlib-compat.h: Likewise.
+ * resolv/Makefile: Likewise.
+ * resolv/res_libc.c: Likewise.
+ * rt/Makefile: Likewise.
+ * sysdeps/i386/asm-syntax.h: Likewise.
+ * sysdeps/i386/sysdep.h: Likewise.
+ * sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: Likewise.
+ * sysdeps/mach/sysdep.h: Likewise.
+ * sysdeps/powerpc/powerpc32/Makefile: Likewise.
+ * sysdeps/powerpc/powerpc64/Makefile: Likewise.
+ * sysdeps/s390/asm-syntax.h: Likewise.
+ * sysdeps/s390/s390-32/sysdep.h: Likewise.
+ * sysdeps/s390/s390-64/sysdep.h: Likewise.
+ * sysdeps/sh/sysdep.h: Likewise.
+ * sysdeps/unix/sparc/sysdep.h: Likewise.
+ * sysdeps/wordsize-32/divdi3.c: Likewise.
+ * sysdeps/x86_64/sysdep.h: Likewise.
+
* argp/Versions: Remove _argp_unlock_xxx.
[BZ #13559]
# We have a special subdir for each binary format.
# For now, only ELF is fully supported.
-ifeq ($(elf),yes)
binfmt-subdir = elf
-else
-# This is probably better than nothing.
-binfmt-subdir = aout
-endif
# Complete path to sysdep dirs.
# `configure' writes a definition of `config-sysdirs' in `config.make'.
endif
# ELF always supports init/fini sections
-ifeq ($(elf),yes)
have-initfini = yes
-endif
ifeq ($(have-as-needed),yes)
as-needed := -Wl,--as-needed
static-start-installed-name = $(start-installed-name)
endif
-ifeq (yesyesyes,$(build-shared)$(elf)$(have-z-combreloc))
+ifeq (yesyes,$(build-shared)$(have-z-combreloc))
combreloc-LDFLAGS = -Wl,-z,combreloc
LDFLAGS.so += $(combreloc-LDFLAGS)
LDFLAGS-rtld += $(combreloc-LDFLAGS)
$(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) $(+postinit)
endif
ifndef config-LDFLAGS
-ifeq (yesyes,$(build-shared)$(elf))
+ifeq (yes,$(build-shared))
config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
endif
endif
ifndef link-libc
ifeq (yes,$(build-shared))
-ifeq ($(elf),yes)
# We need the versioned name of libc.so in the deps of $(others) et al
# so that the symlink to libc.so is created before anything tries to
# run the linked programs.
$(as-needed) $(common-objpfx)elf/ld.so $(no-as-needed) $(gnulib)
# This is how to find at build-time things that will be installed there.
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
-endif
rpath-link = \
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
endif
# Differences in the linkers on the various platforms.
-ifeq ($(elf),yes)
LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
LDFLAGS-soname-fname = -Wl,-soname,$(@F)
LDFLAGS-rdynamic = -rdynamic
LDFLAGS-Bsymbolic = -Bsymbolic
-endif
# Choose the default search path for the dynamic linker based on
# where we will install libraries.
static-gnulib := -lgcc -lgcc_eh $(libunwind)
libc.so-gnulib := -lgcc
endif
-ifeq ($(elf),yes)
+preinit = $(addprefix $(csu-objpfx),crti.o)
+postinit = $(addprefix $(csu-objpfx),crtn.o)
+prector = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbegin.o`
+prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
+postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
+interp = $(addprefix $(elf-objpfx),interp.os)
-endif
csu-objpfx = $(common-objpfx)csu/
elf-objpfx = $(common-objpfx)elf/
# How to run a program we just linked with our library.
# The program binary is assumed to be $(word 2,$^).
built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
-ifeq (yesyes,$(build-shared)$(elf))
+ifeq (yes,$(build-shared))
comma = ,
sysdep-library-path = \
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
endif # build-shared
-ifeq ($(elf),yes)
dlfcn = dlfcn
ifeq ($(build-shared),yes)
libdl = $(common-objpfx)dlfcn/libdl.so$(libdl.so-version)
else
libdl = $(common-objpfx)dlfcn/libdl.a
endif
-else
-ifneq (,$(findstring aix,$(config-os)))
-ifeq ($(build-shared),yes)
-dlfcn = dlfcn
-libdl = $(common-objpfx)dlfcn/libdl.so$(libdl.so-version)
-else
-# No libdl without shared libs on AIX
-dlfcn =
-libdl =
-endif
-else
-# No ELF, no AIX - no libdl, at least for now.
-dlfcn =
-libdl =
-endif
-endif
# These are the subdirectories containing the library source. The order
# is more or less arbitrary. The sorting step will take care of the
\f
# Modify the list of routines we build for different targets
-ifeq (yesyes,$(build-shared)$(elf))
+ifeq (yes,$(build-shared))
ifndef libc.so-version
# Undefine this because it can't work when we libc.so is unversioned.
static-only-routines =
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
# on other shared objects.
lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp)
-ifneq (,$(findstring aix,$(config-os)))
- (echo '#!'; \
- dump -g $< | sed '1,6d' | cut -f2 | sort | uniq) > $(<:a=exp)
-endif
$(build-shlib)
-ifeq ($(elf),yes)
define build-shlib-helper
$(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) $(config-LDFLAGS) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
-else
-ifneq (,$(findstring aix,$(config-os)))
-define build-shlib-helper
-$(LINK.o) -Wl,-G,-bM:SRE,-bnoentry,-bE:$(<:a=exp) \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) $(extra-B-$(@F:lib%.so=%).so) \
- $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
- $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
- -L$(subst :, -L,$(rpath-link))
-endef
-else
-endif
-endif
-ifeq (yes,$(elf))
ifeq (yes,$(use-default-link))
# If the linker is good enough, we can let it use its default linker script.
shlib-lds =
$(build-shlib-helper) -o $@ $(shlib-lds-flags) \
$(csu-objpfx)abi-note.o $(build-shlib-objlist)
endef
-else
-ifneq (,$(findstring aix,$(config-os)))
-define build-shlib
-$(build-shlib-helper) \
- -o $@ \
- $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
- $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
-endef
-define build-shlib
-$(build-shlib-helper) \
- $(build-shlib-objlist)
-endef
-endif
-endif
-ifneq (,$(findstring aix,$(config-os)))
-define build-module-helper
-$(LINK.o) -Wl,-G -Wl,-bM:SRE -Wl,-bnoentry -Wl,-bexpall \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) \
- $(load-map-file) \
- $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
- -L$(subst :, -L,$(rpath-link)) -Wl,-L=$(rpath-link)
-endef
-else
define build-module-helper
$(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(config-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
endef
-endif
# This macro is similar to build-shlib but it does not define a soname
# and it does not depend on the destination name to start with `lib'.
-ifeq (yes,$(elf))
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
define build-module
$(csu-objpfx)abi-note.o \
-Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
endef
-else
-ifneq (,$(findstring aix,$(config-os)))
-define build-module
-$(build-module-helper) \
- -o $@ \
- $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
- $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
-endef
-else
-define build-module
-define build-module
-$(build-module-helper) \
- -o $@ \
- $(build-module-objlist)
-endef
-endif
-endif
build-module-helper-objlist = \
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
# contains some of libc_pic.a already, which will prevent the COMMONs
# from being allocated in libc.so, which introduces evil dependencies
# between libc.so and ld.so, which can make it impossible to upgrade.
-ifeq ($(elf),yes)
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
$(LDFLAGS-c_pic.os) -Wl,-d $(whole-archive) $^ -o $@
common-generated += libc.so$(libc.so-version)
endif
endif
-else
-ifneq (,$(findstring aix,$(config-os)))
-$(common-objpfx)libc.so: $(common-objpfx)libc_pic.a
- @rm -f $@
- (echo '#!'; \
- dump -g $^ | sed '1,6d' | cut -f2 | sort | uniq) > $(^:a=exp)
- sed '/__mulh/d;/__mull/d;/__divss/d;/__divus/d;/__quoss/d;/__quous/d' \
- /lib/syscalls.exp > $(common-objpfx)syscalls.exp
- $(LINK.o) -G -bM:SRE -bnoentry -bE:$(^:a=exp) \
- -bE:$(common-objpfx)syscalls.exp \
- -bI:$(common-objpfx)syscalls.exp \
- -L$(common-objpfx) -o $@ $^
-# AIX runtime ld wants libc.so to be libc.a(shr.o) hardwired
- cp $@ $(common-objpfx)shr.o
- $(AR) $(ARFLAGS) $(common-objpfx)libc.a $(common-objpfx)shr.o
-endif
-endif
\f
# Figure out the source filenames in this directory.
* The following bugs are resolved with this release:
- 13526, 13527, 13528, 13529, 13531, 13532, 13533, 13547, 13552, 13555,
- 13559
+ 13526, 13527, 13528, 13529, 13531, 13532, 13533, 13547, 13551, 13552,
+ 13555, 13559
* ISO C11 support:
# error "glibc must not be compiled with -ffast-math"
#endif
-/* Define if using ELF, which supports weak symbols.
- This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
- --with-elf. */
-#undef HAVE_ELF
-
/* Define if building with SELinux support. Set by --with-selinux. */
#undef HAVE_SELINUX
/* Defined if building with SELinux support & libcap libs are detected. */
#undef HAVE_LIBCAP
-/* Define if using XCOFF. Set by --with-xcoff. */
-#undef HAVE_XCOFF
-
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#undef NO_UNDERSCORES
c++-sysincludes = @CXX_SYSINCLUDES@
all-warnings = @all_warnings@
-elf = @elf@
have-z-combreloc = @libc_cv_z_combreloc@
have-z-execstack = @libc_cv_z_execstack@
have-initfini = @libc_cv_have_initfini@
libc_cv_pic_default
shared
static
-xcoff
-elf
ldd_rewrite_script
use_ldconfig
libc_cv_as_i686
with_binutils
with_elf
with_selinux
-with_xcoff
with_headers
with_default_link
enable_sanity_checks
--with-binutils=PATH specify location of binutils (as and ld)
--with-elf if using the ELF object format
--with-selinux if building with SELinux support
- --with-xcoff if using the XCOFF object format
--with-headers=PATH location of system headers to use (for example
/usr/src/linux/include) [default=compiler default]
--with-default-link do not use explicit linker scripts
fi
-# Check whether --with-xcoff was given.
-if test "${with_xcoff+set}" = set; then :
- withval=$with_xcoff; xcoff=$withval
-else
- xcoff=no
-fi
-
-
# Check whether --with-headers was given.
if test "${with_headers+set}" = set; then :
config_os="`echo $config_os | sed 's/^unknown-//'`"
# Some configurations imply other options.
-case "$host_os" in
-# i586-linuxaout is mangled into i586-pc-linux-gnuaout
-linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
- ;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
- # These systems (almost) always use the ELF format.
- elf=yes
- ;;
-aix*)
- # These systems are always xcoff
- xcoff=yes
- elf=no
- ;;
-esac
+elf=yes
# The configure fragment of an add-on port can modify these to supplement
# or override the table in the case statement below. No fragment should
###
if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
case "$machine-$host_os" in
- *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+ *-linux* | *-gnu* | arm*-none*)
;;
*)
echo "*** The GNU C library is currently not available for this platform."
base_os=unix/sysv/irix6/$os ;;
solaris[2-9]*)
base_os=unix/sysv/sysv4 ;;
-hpux*)
- base_os=unix/sysv/hpux/$os ;;
-aix4.3*)
- base_os=unix/sysv/aix/aix4.3 ;;
none)
base_os=standalone ;;
esac
-if test $elf = yes; then
- $as_echo "#define HAVE_ELF 1" >>confdefs.h
-
-fi
-if test $xcoff = yes; then
- $as_echo "#define HAVE_XCOFF 1" >>confdefs.h
-
-fi
-
-
if test $shared = default; then
shared=$elf
[if building with SELinux support]),
[with_selinux=$withval],
[with_selinux=auto])
-AC_ARG_WITH([xcoff],
- AC_HELP_STRING([--with-xcoff],
- [if using the XCOFF object format]),
- [xcoff=$withval],
- [xcoff=no])
AC_ARG_WITH([headers],
AC_HELP_STRING([--with-headers=PATH],
config_os="`echo $config_os | sed 's/^unknown-//'`"
# Some configurations imply other options.
-case "$host_os" in
-# i586-linuxaout is mangled into i586-pc-linux-gnuaout
-linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
- ;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
- # These systems (almost) always use the ELF format.
- elf=yes
- ;;
-aix*)
- # These systems are always xcoff
- xcoff=yes
- elf=no
- ;;
-esac
+elf=yes
# The configure fragment of an add-on port can modify these to supplement
# or override the table in the case statement below. No fragment should
###
if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
case "$machine-$host_os" in
- *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+ *-linux* | *-gnu* | arm*-none*)
;;
*)
echo "*** The GNU C library is currently not available for this platform."
base_os=unix/sysv/irix6/$os ;;
solaris[2-9]*)
base_os=unix/sysv/sysv4 ;;
-hpux*)
- base_os=unix/sysv/hpux/$os ;;
-aix4.3*)
- base_os=unix/sysv/aix/aix4.3 ;;
none)
base_os=standalone ;;
esac
AC_SUBST(use_ldconfig)
AC_SUBST(ldd_rewrite_script)
-AC_SUBST(elf) AC_SUBST(xcoff)
-if test $elf = yes; then
- AC_DEFINE(HAVE_ELF)
-fi
-if test $xcoff = yes; then
- AC_DEFINE(HAVE_XCOFF)
-fi
-
AC_SUBST(static)
AC_SUBST(shared)
if test $shared = default; then
# Makefile for csu code for GNU C library.
-# Copyright (C) 1995-2004, 2005, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1995-2006, 2010, 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
install-lib += $(static-start-installed-name) g$(static-start-installed-name)
endif
-ifeq (yes,$(elf))
before-compile += $(objpfx)abi-tag.h
generated += abi-tag.h
-endif
ifeq ($(have-initfini),yes)
endif
-ifeq (yes,$(elf))
extra-objs += abi-note.o init.o
asm-CPPFLAGS += -I$(objpfx).
-endif
include ../Rules
endef
ifndef start-installed-name-rule
-ifeq (yes,$(elf))
# We link the ELF startfile along with a SHT_NOTE section indicating
# the kernel ABI the binaries linked with this library will require.
$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o \
$(objpfx)b$(start-installed-name): $(objpfx)start.ob $(objpfx)abi-note.ob \
$(objpfx)init.ob
$(link-relocatable)
-else
-# The startfile is installed under different names, so we just call our
-# source file `start.c' and copy to the installed name after compiling.
-$(objpfx)$(start-installed-name): $(objpfx)start.o
- rm -f $@
- ln $< $@
-$(objpfx)S$(start-installed-name): $(objpfx)start.os
- rm -f $@
- ln $< $@
-$(objpfx)b$(start-installed-name): $(objpfx)start.ob
- rm -f $@
- ln $< $@
-endif
endif
# The profiling startfile is made by linking together the normal
}
weak_alias (__gnu_get_libc_version, gnu_get_libc_version)
-#ifdef HAVE_ELF
/* This function is the entry point for the shared object.
Running the library as a program will get here. */
__libc_print_version ();
_exit (0);
}
-#endif
-# Copyright (C) 1998-2001,2004-2008, 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001,2004-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
include ../Makeconfig
distribute += catchsegv.sh xtrace.sh
-ifeq ($(elf),yes)
ifeq ($(build-shared),yes)
install-bin-script += catchsegv
endif
-endif
generated = catchsegv xtrace
include ../Rules
-# Copyright (C) 1995-2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1995-2006, 2010, 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
glreflib2.so-no-z-defs = yes
errmsg1mod.so-no-z-defs = yes
-ifeq (yesyesyes,$(build-static)$(build-shared)$(elf))
+ifeq (yesyes,$(build-static)$(build-shared))
tests += tststatic tststatic2
tests-static += tststatic tststatic2
modules-names += modstatic modstatic2
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
$(objpfx)libdl.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
- $(if $(filter yes,$(elf)), $(elfobjdir)/ld.so)
+ $(elfobjdir)/ld.so
-# Copyright (C) 1995-2007,2008,2009,2010,2011 Free Software Foundation, Inc.
+# Copyright (C) 1995-2011, 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
endif
ifeq (yes,$(build-static))
tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static
-ifeq (yesyesyes,$(build-static)$(build-shared)$(elf))
+ifeq (yesyes,$(build-static)$(build-shared))
tests-static += tst-tls9-static
tst-tls9-static-ENV = \
LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
ifneq (,$($(lib)-static-only-routines))
-ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
+ifneq (,$(filter yes%,$(build-shared)$($(lib).so-version)))
object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
endif
endif
-# Copyright (C) 1997,1998,2000-2004,2007,2009 Free Software Foundation, Inc.
+# Copyright (C) 1997,1998,2000-2004,2007,2009,2012
+# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
routines = iconv_open iconv iconv_close \
gconv_open gconv gconv_close gconv_db gconv_conf \
gconv_builtin gconv_simple gconv_trans gconv_cache
-ifeq ($(elf),yes)
routines += gconv_dl
-else
-CFLAGS-gconv_db.c = -DSTATIC_GCONV
-CFLAGS-gconv_cache.c = -DSTATIC_GCONV
-CFLAGS-gconv_simple.c = -DSTATIC_GCONV
-endif
vpath %.c ../locale/programs ../intl
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995-1998,2000-2006,2008,2009,2011
+ Copyright (C) 1995-1998,2000-2006,2008,2009,2011,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
* ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
* ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
or leave it undefined if there is no .type directive.
- * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
* HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
* HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
#include <config.h>
-/* The symbols in all the user (non-_) macros are C symbols.
- NO HAVE_ELF implies a.out. */
+/* The symbols in all the user (non-_) macros are C symbols. */
#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
# define HAVE_WEAK_SYMBOLS
/* 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. */
-# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
-# define __make_section_unallocated(section_string) \
+#ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
+# define __make_section_unallocated(section_string) \
asm (".section " section_string "\n\t.previous");
-# elif defined HAVE_ASM_POPSECTION_DIRECTIVE
-# define __make_section_unallocated(section_string) \
+#elif defined HAVE_ASM_POPSECTION_DIRECTIVE
+# define __make_section_unallocated(section_string) \
asm (".pushsection " section_string "\n\t.popsection");
-# else
-# define __make_section_unallocated(section_string)
-# endif
+#else
+# define __make_section_unallocated(section_string)
+#endif
/* 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 HAVE_SECTION_QUOTES
-# define __sec_comment "\"\n\t#\""
-# else
-# define __sec_comment "\n\t#"
-# endif
-# define link_warning(symbol, msg) \
+#ifdef HAVE_SECTION_QUOTES
+# define __sec_comment "\"\n\t#\""
+#else
+# define __sec_comment "\n\t#"
+#endif
+#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;
-# define libc_freeres_ptr(decl) \
+#define libc_freeres_ptr(decl) \
__make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \
decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment)))
-# define __libc_freeres_fn_section \
+#define __libc_freeres_fn_section \
__attribute__ ((section ("__libc_freeres_fn")))
-#else /* Not ELF: a.out */
-# ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
- The native aix linker will remove the .stab and .stabstr sections
- The gnu linker will have a fatal error if there is a relocation for
- symbol in the .stab section. Silently disable this macro. */
-# define link_warning(symbol, msg)
-# else
-# define link_warning(symbol, msg) \
- asm (".stabs \"" msg "\",30,0,0,0\n\t" \
- ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
-# endif /* XCOFF */
-# define libc_freeres_ptr(decl) decl
-# define __libc_freeres_fn_section
-#endif
+
#define libc_freeres_fn(name) \
static void name (void) __attribute_used__ __libc_freeres_fn_section; \
text_set_element (__libc_subfreeres, name); \
/* Symbol set support macros. */
-#ifdef HAVE_ELF
-
/* Make SYMBOL, which is in the text segment, an element of SET. */
-# define text_set_element(set, symbol) _elf_set_element(set, symbol)
+#define text_set_element(set, symbol) _elf_set_element(set, symbol)
/* Make SYMBOL, which is in the data segment, an element of SET. */
-# define data_set_element(set, symbol) _elf_set_element(set, symbol)
+#define data_set_element(set, symbol) _elf_set_element(set, symbol)
/* Make SYMBOL, which is in the bss segment, an element of SET. */
-# define bss_set_element(set, symbol) _elf_set_element(set, symbol)
+#define bss_set_element(set, symbol) _elf_set_element(set, symbol)
/* These are all done the same way in ELF.
There is a new section created for each set. */
-# ifdef SHARED
+#ifdef SHARED
/* When building a shared library, make the set section writable,
because it will need to be relocated at run time anyway. */
-# define _elf_set_element(set, symbol) \
+# define _elf_set_element(set, symbol) \
static const void *__elf_set_##set##_element_##symbol##__ \
__attribute__ ((used, section (#set))) = &(symbol)
-# else
-# define _elf_set_element(set, symbol) \
+#else
+# define _elf_set_element(set, symbol) \
static const void *const __elf_set_##set##_element_##symbol##__ \
__attribute__ ((used, section (#set))) = &(symbol)
-# endif
+#endif
/* Define SET as a symbol set. This may be required (it is in a.out) to
be able to use the set's contents. */
-# define symbol_set_define(set) symbol_set_declare(set)
+#define symbol_set_define(set) symbol_set_declare(set)
/* Declare SET for use in this module, if defined in another module.
In a shared library, this is always local to that shared object.
For static linking, the set might be wholly absent and so we use
weak references. */
-# define symbol_set_declare(set) \
+#define symbol_set_declare(set) \
extern char const __start_##set[] __symbol_set_attribute; \
extern char const __stop_##set[] __symbol_set_attribute;
-# ifdef SHARED
-# define __symbol_set_attribute attribute_hidden
-# else
-# define __symbol_set_attribute __attribute__ ((weak))
-# endif
+#ifdef SHARED
+# define __symbol_set_attribute attribute_hidden
+#else
+# define __symbol_set_attribute __attribute__ ((weak))
+#endif
/* Return a pointer (void *const *) to the first element of SET. */
-# define symbol_set_first_element(set) ((void *const *) (&__start_##set))
+#define symbol_set_first_element(set) ((void *const *) (&__start_##set))
/* Return true iff PTR (a void *const *) has been incremented
past the last element in SET. */
-# define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set)
-
-#else /* Not ELF: a.out. */
-
-# ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
- The native aix linker will remove the .stab and .stabstr sections
- The gnu linker will have a fatal error if there is a relocation for
- symbol in the .stab section. Silently disable these macros. */
-# define text_set_element(set, symbol)
-# define data_set_element(set, symbol)
-# define bss_set_element(set, symbol)
-# else
-# define text_set_element(set, symbol) \
- asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
-# define data_set_element(set, symbol) \
- asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
-# define bss_set_element(set, symbol) ?error Must use initialized data.
-# endif /* XCOFF */
-# define symbol_set_define(set) void *const (set)[1];
-# define symbol_set_declare(set) extern void *const (set)[1];
-
-# define symbol_set_first_element(set) &(set)[1]
-# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
-
-#endif /* ELF. */
+#define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set)
#if DO_VERSIONING
# define symbol_version(real, name, version) \
/* Macros for managing ABI-compatibility definitions using ELF symbol versions.
- Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2006, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#ifndef _SHLIB_COMPAT_H
#define _SHLIB_COMPAT_H 1
-#if defined HAVE_ELF && defined DO_VERSIONING
+#if defined DO_VERSIONING
/* Since there is just one set of .d files generated, we need to
include this unconditionally to have the dependency noticed properly. */
#include <abi-versions.h> /* header generated by abi-versions.awk */
#endif
-#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
+#if defined SHARED && defined DO_VERSIONING
/* The file abi-versions.h (generated by scripts/abi-versions.awk) defines
symbols like `ABI_libm_GLIBC_2_0' for each version set in the source
2012-01-07 Ulrich Drepper <drepper@gmail.com>
+ * Makefile: Remove elf=yes test, only ELF is supported.
+
* shlib-versions: Remove entries for ports architectures.
In case anyone cares, the IA-64 architecture could move to ports.
-# Copyright (C) 2002-2008,2009,2010 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008,2009,2010,2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# Depend on ld.so too to get proper versions of ld.so symbols.
$(objpfx)libpthread.so: $(common-objpfx)libc.so \
$(common-objpfx)libc_nonshared.a \
- $(if $(filter yes,$(elf)), $(elfobjdir)/ld.so)
+ $(elfobjdir)/ld.so
# Make sure we link with the thread library.
ifeq ($(build-shared),yes)
-# Copyright (C) 1994-2001,2003,2004,2007,2008,2011
+# Copyright (C) 1994-2001,2003,2004,2007,2008,2011,2012
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
$(objpfx)libresolv.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
# Some hosts need '__stack_chk_guard', so pull in the definition from
# ld.so if required.
-ifeq (yesyes,$(have-ssp)$(elf))
+ifeq (yes,$(have-ssp))
LDLIBS-resolv.so += $(as-needed) $(elfobjdir)/ld.so $(no-as-needed)
endif
/* We declare this with compat_symbol so that it's not
visible at link time. Programs must use the accessor functions. */
-#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
+#if defined SHARED && defined DO_VERSIONING
# include <shlib-compat.h>
compat_symbol (libc, _res, _res, GLIBC_2_0);
#endif
-# Copyright (C) 1997-2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2004, 2006, 2007, 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# a statically-linked program that hasn't already loaded it.
$(objpfx)librt.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
$(shared-thread-library) \
- $(if $(filter yes,$(elf)), $(elfobjdir)/ld.so)
+ $(elfobjdir)/ld.so
ifeq (yes,$(build-shared))
$(addprefix $(objpfx),$(tests)): $(objpfx)librt.so $(shared-thread-library)
ifeq (yes,$(build-static-nss))
otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
+ $(resolvobjdir)/libresolv.a
endif
/* Definitions for x86 syntax variations.
- Copyright (C) 1992, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992,1994,1995,1997,2000,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
02111-1307 USA. */
#undef ALIGN
-#if defined NOLOG_ALIGN || defined HAVE_ELF
-# define ALIGN(log) .align 1<<log
-#else
-# define ALIGN(log) .align log
-#endif
+#define ALIGN(log) .align 1<<log
#undef L
#ifdef __ELF__
/* Assembler macros for i386.
- Copyright (C) 1991-93,95,96,98,2002,2003,2005,2006,2011
+ Copyright (C) 1991-93,95,96,98,2002,2003,2005,2006,2011,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Syntactic details of assembler. */
-#ifdef HAVE_ELF
-
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
/* For ELF we need the `.type' directive to make shared libs work right. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-
-#endif
-
/* Define an entry point visible from C.
/* Local label name for asm code. */
#ifndef L
-#ifdef HAVE_ELF
#define L(name) .L##name
-#else
-#define L(name) name
-#endif
#endif
#define atom_text_section .section ".text.atom", "ax"
SHLIB_COMPAT(lib, introduced, LONG_DOUBLE_COMPAT_VERSION)
#define long_double_symbol(lib, local, symbol) \
long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
-#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
+#if defined SHARED && defined DO_VERSIONING
# define ldbl_hidden_def(local, name) libc_hidden_ver (local, name)
# define ldbl_strong_alias(name, aliasname) \
strong_alias (name, __GL_##name##_##aliasname) \
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#define EXT(x) C_SYMBOL_NAME(x)
#define LEXT(x) C_SYMBOL_NAME(x##:)
-#ifdef HAVE_ELF
/* For ELF we need to add the `.type' directive to make shared libraries
work right. */
#undef ENTRY
.align ALIGN; \
.type name,@function; \
name:
-#endif
#endif
endif
ifeq ($(subdir),csu)
-ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
CFLAGS-initfini.s += -fpic -O1
# of the library should be able to control what goes into sdata.
CFLAGS-init.o = -G0
CFLAGS-gmon-start.o = -G0
-endif
+
ifeq (yes,$(build-shared))
# Compatibility
ifeq (yes,$(have-protected))
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing
-ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
CFLAGS-initfini.s += -fpic -O1
endif
-endif
ifeq ($(subdir),elf)
# help gcc inline asm code from dl-machine.h
/* Definitions for S/390 syntax variations.
- Copyright (C) 1992, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1994, 1995, 1997, 2000, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
02111-1307 USA. */
#undef ALIGN
-#if defined NOLOG_ALIGN || defined HAVE_ELF
-# define ALIGN(log) .align 1<<log
-#else
-# define ALIGN(log) .align log
-#endif
+#define ALIGN(log) .align 1<<log
#undef L
#ifdef __ELF__
/* Assembler macros for s390.
- Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2012 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
/* Syntactic details of assembler. */
-#ifdef HAVE_ELF
-
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
/* For ELF we need the `.type' directive to make shared libs work right. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-
-#endif
-
/* Define an entry point visible from C. */
#define ENTRY(name) \
/* Assembler macros for 64 bit S/390.
- Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2012 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
/* Syntactic details of assembler. */
-#ifdef HAVE_ELF
-
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
/* For ELF we need the `.type' directive to make shared libs work right. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-
-#endif
-
/* Define an entry point visible from C. */
#define ENTRY(name) \
/* Assembler macros for SH.
- Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2005, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Syntactic details of assembler. */
-#ifdef HAVE_ELF
-
#define ALIGNARG(log2) log2
/* For ELF we need the `.type' directive to make shared libs work right. */
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,@##typearg;
#define PLTJMP(_x) _x
#endif
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-
-#define PLTJMP(_x) _x
-
-#endif
/* Define an entry point visible from C. */
#define ENTRY(name) \
-/* Copyright (C) 1993, 1994, 1995, 1997, 2003, 2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1997, 2003, 2011, 2012
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
mov %##tmp, %o7;
#endif
-#ifdef HAVE_ELF
#define ENTRY(name) \
.global C_SYMBOL_NAME(name); \
.type name,@function; \
.align 4; \
C_LABEL(name)
-#else
-#define ENTRY(name) \
- .global C_SYMBOL_NAME(name); \
- .align 4; \
- C_LABEL(name)
-
-#endif /* HAVE_ELF */
#define PSEUDO(name, syscall_name, args) \
.global syscall_error; \
/* 64-bit multiplication and division
- Copyright (C) 1989, 1992-1999,2000,2001,2002,2003,2004,2005
+ Copyright (C) 1989, 1992-1999,2000,2001,2002,2003,2004,2005,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* We declare these with compat_symbol so that they are not visible at
link time. Programs must use the functions from libgcc. */
-#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
+#if defined SHARED && defined DO_VERSIONING
# include <shlib-compat.h>
compat_symbol (libc, __divdi3, __divdi3, GLIBC_2_0);
compat_symbol (libc, __moddi3, __moddi3, GLIBC_2_0);
/* Assembler macros for x86-64.
- Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Syntactic details of assembler. */
-#ifdef HAVE_ELF
-
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
/* For ELF we need the `.type' directive to make shared libs work right. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-
-#endif
-
/* Define an entry point visible from C. */
#define ENTRY(name) \
/* Local label name for asm code. */
#ifndef L
-# ifdef HAVE_ELF
/* ELF-like local names start with `.L'. */
-# define L(name) .L##name
-# else
-# define L(name) name
-# endif
+# define L(name) .L##name
#endif
#define atom_text_section .section ".text.atom", "ax"