summaryrefslogtreecommitdiff
path: root/csu
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2012-04-05 01:33:59 +0200
committerThomas Schwinge <thomas@schwinge.name>2012-04-05 01:33:59 +0200
commitd9825184e1f34e007ab321099fed328e9616789a (patch)
treeb087e131a7c7b1265090ed5c02a26f44f83e2961 /csu
parent14d9e2b1fd8298da6cd388d421553d6ee8159ef7 (diff)
parent6a9c58703f282fc2491e5e67c8180f00da320ef8 (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts: configure configure.in posix/glob/configure sysdeps/i386/sysdep.h sysdeps/ia64/configure sysdeps/mach/hurd/socket.c
Diffstat (limited to 'csu')
-rw-r--r--csu/Makefile71
-rw-r--r--csu/abi-note.S5
-rw-r--r--csu/check_fds.c5
-rw-r--r--csu/defs.awk27
-rw-r--r--csu/dso_handle.c5
-rw-r--r--csu/elf-init.c5
-rw-r--r--csu/errno-loc.c5
-rw-r--r--csu/errno.c5
-rw-r--r--csu/gmon-start.c21
-rw-r--r--csu/init-first.c5
-rw-r--r--csu/init.c5
-rw-r--r--csu/libc-start.c5
-rw-r--r--csu/libc-tls.c5
-rw-r--r--csu/start.c2
-rw-r--r--csu/tst-atomic-long.c5
-rw-r--r--csu/tst-atomic.c5
-rw-r--r--csu/version.c11
17 files changed, 38 insertions, 154 deletions
diff --git a/csu/Makefile b/csu/Makefile
index 69e07c71cf..8e8a41ecad 100644
--- a/csu/Makefile
+++ b/csu/Makefile
@@ -1,5 +1,5 @@
# 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
@@ -13,16 +13,14 @@
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
# This directory contains the C startup code (that which calls main). This
# consists of the startfile, built from start.c and installed as crt0.o
# (traditionally) or crt1.o (for ELF). In ELF we also install crti.o and
# crtn.o, special "initializer" and "finalizer" files used in the link
-# to make the .init and .fini sections work right; both these files are
-# built (in an arcane manner) from initfini.c.
+# to make the .init and .fini sections work right.
subdir := csu
@@ -39,7 +37,7 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
b$(start-installed-name) $(csu-dummies) \
S$(start-installed-name))
install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
-distribute = initfini.c gmon-start.c start.c defs.awk \
+distribute = gmon-start.c start.c \
abi-note.S init.c c not-cancel.h
generated = version-info.h
before-compile = $(objpfx)version-info.h
@@ -70,14 +68,8 @@ omit-deps += $(patsubst %.o,%,$(static-start-installed-name) \
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)
-
-CPPFLAGS += -DHAVE_INITFINI
# These are the special initializer/finalizer files. They are always the
# first and last file in the link. crti.o ... crtn.o define the global
@@ -86,48 +78,9 @@ crtstuff = crti crtn
install-lib += $(crtstuff:=.o)
extra-objs += $(crtstuff:=.o)
-generated += $(crtstuff:=.S) initfini.s defs.h
-omit-deps += $(crtstuff)
-
-# Special rules for the building of crti.o and crtn.o
-$(crtstuff:%=$(objpfx)%.o): %.o: %.S $(objpfx)defs.h
- $(compile.S) -g0 $(ASFLAGS-.os) -o $@
-
-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
-
-vpath initfini.c $(sysdirs)
-
-$(objpfx)initfini.s: initfini.c $(before-compile)
- $(compile.c) -S $(CFLAGS-initfini.s) -finhibit-size-directive \
- $(patsubst -f%,-fno-%,$(exceptions)) -o $@
-
-# We only have one kind of startup code files. Static binaries and
-# shared libraries are build using the PIC version.
-$(objpfx)crti.S: $(objpfx)initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-$(objpfx)crtn.S: $(objpfx)initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-# These explicit rules are necessary when the $(objpfx) subdirectory
-# did not exist at the time make considered the implicit rules using it.
-# This comes up with a fresh build using no_deps=t.
-$(patsubst %,$(objpfx)crt%.o,i n): %.o: %.S
-
-$(objpfx)defs.h: $(objpfx)initfini.s
- sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- $(AWK) -f defs.awk > $@
-
-endif
-
-ifeq (yes,$(elf))
extra-objs += abi-note.o init.o
asm-CPPFLAGS += -I$(objpfx).
-endif
include ../Rules
@@ -139,7 +92,6 @@ $(CC) -nostdlib -nostartfiles -r -o $@ $^
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 \
@@ -151,19 +103,6 @@ $(objpfx)S$(start-installed-name): $(objpfx)start.os $(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
diff --git a/csu/abi-note.S b/csu/abi-note.S
index 19c50d04f1..e1a44a9ed4 100644
--- a/csu/abi-note.S
+++ b/csu/abi-note.S
@@ -22,9 +22,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* Define an ELF note identifying the operating-system ABI that the
executable was created for. The ELF note information identifies a
diff --git a/csu/check_fds.c b/csu/check_fds.c
index 10ba3da395..dcd508d28f 100644
--- a/csu/check_fds.c
+++ b/csu/check_fds.c
@@ -12,9 +12,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <fcntl.h>
diff --git a/csu/defs.awk b/csu/defs.awk
deleted file mode 100644
index 7ca5a33646..0000000000
--- a/csu/defs.awk
+++ /dev/null
@@ -1,27 +0,0 @@
-/^[ ]*\.endp/ { need_endp = 1 }
-/^[ ]*\.end/ { need_end = 1 }
-/^[ ]*\.align/ { if($2 > max) max = $2; }
-
-END {
- if(need_endp)
- {
- print "#define END_INIT .endp _init";
- print "#define END_FINI .endp _fini";
- } else if(need_end)
- {
- print "#define END_INIT .end _init";
- print "#define END_FINI .end _fini";
- }
- else
- {
- print "#define END_INIT";
- print "#define END_FINI";
- }
- if(max)
- print "#define ALIGN .align", max;
- else
- print "#define ALIGN";
-
- print "#include <libc-symbols.h>";
- print "weak_extern (__gmon_start__)";
-}
diff --git a/csu/dso_handle.c b/csu/dso_handle.c
index fd295f2442..0aad835a30 100644
--- a/csu/dso_handle.c
+++ b/csu/dso_handle.c
@@ -12,9 +12,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* We have to define __dso_handle ourselves since we do not use gcc's
crtbegin files. */
diff --git a/csu/elf-init.c b/csu/elf-init.c
index 56c2b02b91..91ba74ce55 100644
--- a/csu/elf-init.c
+++ b/csu/elf-init.c
@@ -31,9 +31,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <stddef.h>
diff --git a/csu/errno-loc.c b/csu/errno-loc.c
index f7de2b7b08..3b646a4a31 100644
--- a/csu/errno-loc.c
+++ b/csu/errno-loc.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <tls.h>
diff --git a/csu/errno.c b/csu/errno.c
index d5d2c98fb7..a383d8f549 100644
--- a/csu/errno.c
+++ b/csu/errno.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <tls.h>
diff --git a/csu/gmon-start.c b/csu/gmon-start.c
index 7d585e135f..f0327a6cfd 100644
--- a/csu/gmon-start.c
+++ b/csu/gmon-start.c
@@ -1,5 +1,5 @@
/* Code to enable profiling at program startup.
- Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,2000,2001,2002,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
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <sys/types.h>
#include <sys/gmon.h>
@@ -43,23 +42,14 @@ extern char etext[];
# endif
#endif
-#ifndef HAVE_INITFINI
-/* This function gets called at startup by the normal constructor
- mechanism. We link this file together with start.o to produce gcrt1.o,
- so this constructor will be first in the list. */
-
-extern void __gmon_start__ (void) __attribute__ ((constructor));
-#else
-/* In ELF and COFF, we cannot use the normal constructor mechanism to call
+/* We cannot use the normal constructor mechanism to call
__gmon_start__ because gcrt1.o appears before crtbegin.o in the link.
- Instead crti.o calls it specially (see initfini.c). */
+ Instead crti.o calls it specially. */
extern void __gmon_start__ (void);
-#endif
void
__gmon_start__ (void)
{
-#ifdef HAVE_INITFINI
/* Protect from being called more than once. Since crti.o is linked
into every shared library, each of their init functions will call us. */
static int called;
@@ -68,7 +58,6 @@ __gmon_start__ (void)
return;
called = 1;
-#endif
/* Start keeping profiling records. */
__monstartup ((u_long) TEXT_START, (u_long) &etext);
diff --git a/csu/init-first.c b/csu/init-first.c
index 59fd477579..050959dcb2 100644
--- a/csu/init-first.c
+++ b/csu/init-first.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <ctype.h>
#include <unistd.h>
diff --git a/csu/init.c b/csu/init.c
index 559d13e647..a88c8c2c0f 100644
--- a/csu/init.c
+++ b/csu/init.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#if defined __GNUC__ && __GNUC__ >= 2
diff --git a/csu/libc-start.c b/csu/libc-start.c
index 7576623bec..dcf2bac0e6 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -12,9 +12,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <stdlib.h>
#include <stdio.h>
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index 5a49942861..b00a5ccb9d 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <errno.h>
#include <ldsodefs.h>
diff --git a/csu/start.c b/csu/start.c
index 08f985c482..d7d7a8510d 100644
--- a/csu/start.c
+++ b/csu/start.c
@@ -8,6 +8,4 @@
/* The first piece of initialized data. */
int __data_start = 0;
-#ifdef HAVE_WEAK_SYMBOLS
weak_alias (__data_start, data_start)
-#endif
diff --git a/csu/tst-atomic-long.c b/csu/tst-atomic-long.c
index 75a71ebd5f..e15b4c2e3e 100644
--- a/csu/tst-atomic-long.c
+++ b/csu/tst-atomic-long.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <bits/wordsize.h>
diff --git a/csu/tst-atomic.c b/csu/tst-atomic.c
index 7c0b022b78..8115669352 100644
--- a/csu/tst-atomic.c
+++ b/csu/tst-atomic.c
@@ -14,9 +14,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <atomic.h>
diff --git a/csu/version.c b/csu/version.c
index bab778e649..78039388e2 100644
--- a/csu/version.c
+++ b/csu/version.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992-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
@@ -12,9 +12,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "version.h"
#include <tls.h>
@@ -26,7 +25,7 @@ static const char __libc_version[] = VERSION;
static const char banner[] =
"GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\
-Copyright (C) 2011 Free Software Foundation, Inc.\n\
+Copyright (C) 2012 Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
PARTICULAR PURPOSE.\n\
@@ -66,7 +65,6 @@ __gnu_get_libc_version (void)
}
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. */
@@ -77,4 +75,3 @@ __libc_main (void)
__libc_print_version ();
_exit (0);
}
-#endif