From 779ae82ecdf88b7ed7c1f00d3ed3a639671c3c8d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Apr 1997 15:51:34 +0000 Subject: Update. 1997-04-30 17:35 Ulrich Drepper * math/libm-test.c: Implement test for exceptions. Partly due to Andreas Jaeger. (csin_test): New function. * sysdeps/libm-i387/s_cexp.S: Raise correct exceptions. * sysdeps/libm-i387/s_cexpf.S: Likewise. * sysdeps/libm-i387/s_cexpl.S: Likewise. * sysdeps/libm-ieee754/s_ccos.c: Likewise. * sysdeps/libm-ieee754/s_ccosf.c: Likewise. * sysdeps/libm-ieee754/s_ccosl.c: Likewise. * sysdeps/libm-ieee754/s_ccosh.c: Likewise. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_cexp.c: Likewise. * sysdeps/libm-ieee754/s_cexpf.c: Likewise. * sysdeps/libm-ieee754/s_cexpl.c: Likewise. * sysdeps/libm-ieee754/s_csinh.c: Likewise. * sysdeps/libm-ieee754/s_csinhf.c: Likewise. * sysdeps/libm-ieee754/s_csinhl.c: Likewise. * sysdeps/libm-ieee754/s_ctanh.c: Likewise. * sysdeps/libm-ieee754/s_ctanhf.c: Likewise. * sysdeps/libm-ieee754/s_ctanhl.c: Likewise. * sysdeps/libm-ieee754/s_ccosh.c: Correct computation. * sysdeps/libm-ieee754/s_ccoshf.c: Likewise. * sysdeps/libm-ieee754/s_ccoshl.c: Likewise. * sysdeps/libm-ieee754/s_csinh.c: Likewise. * sysdeps/libm-ieee754/s_csinhf.c: Likewise. * sysdeps/libm-ieee754/s_csinhl.c: Likewise. * sysdeps/libm-ieee754/s_csin.c: Rewrite. * sysdeps/libm-ieee754/s_csinf.c: Likewise. * sysdeps/libm-ieee754/s_csinl.c: Likewise. * stdlib/random_r.c (__srandom_r): Don't use seed 0. Use 1 in this case. * sysdeps/i386/dl-machine.h (elf_machine_load_address): Use notation for local label. * time/strftime.c (add): Respect `0' padding flag. Reported by Richard Stallman . 1997-04-30 15:46 Ulrich Drepper * Makeconfig (start-installed-name): Define here, not in csu/Makefile. Use in +link macro. * csu/Makefile (distribute): Add abi-note.S and abi-tag.h. (start-installed-name): Don't define here. When ELF generate file named by start-installed-name from start.o and abi-note.o. * csu/abi-note.S: New file. * sysdeps/stub/abi-tag.h: New file. * sysdpes/unix/sysv/linux/abi-tag.h: New file. Patches by Roland McGrath . 1997-04-30 01:32 Ulrich Drepper * manual/stdio.texi: Use @vtable where possible. Add TeX version of @multitable since texi2dvi cannot handle them correct in the moment. * po/de.po: Update. 1997-04-29 21:06 Ulrich Drepper * Makeconfig: Don't set cross-compiling based on $(BUILD_CC) != $(CC). * config.make.in: Set cross-compiling from configure result. * configure.in: Emit definition of `cross_compiling'. Patches by Marcus G. Daniels . 1997-04-27 21:50 Philip Blundell * sysdeps/unix/sysv/linux/net/route.h (struct in6_rtmsg): Use correct `int' sizes for struct members. 1997-04-29 19:14 Ulrich Drepper * sysdeps/libm-i387/e_powf.S Generate invalid exception correctly. * sysdeps/libm-i387/e_pow.S: Likewise. * sysdeps/libm-i387/e_powl.S: Likewise. 1997-04-23 10:08 Andreas Jaeger * math/fenv.h: Correct typos. 1997-04-28 10:04 Richard Henderson * sysdeps/unix/sysv/linux/alpha/clone.S: Save the function argument in t0 rather than a4 to avoid it being clobbered. 1997-04-27 23:52 Andreas Schwab * manual/summary.awk: Recognize @defmumblex. * manual/signal.texi (Miscellaneous Signals): Use @deftypevrx for second description header. 1997-04-27 23:29 Andreas Schwab * manual/arith.texi (Floating-Point Classes): Don't indent text, makeinfo doesn't like that. 1997-04-27 20:52 Andreas Schwab * malloc/obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun, obstack_freefun): Fix casts. 1997-04-27 18:21 Andreas Schwab * manual/xtract-typefun.awk: Allow names with only one character. 1997-04-26 14:16 Ulrich Drepper * sysdeps/unix/sysv/linux/netinet/ip_fw.h: Use not . Reported by Michael Deutschmann . 1997-04-25 12:31 Ulrich Drepper * csu/Makefile ($(objpfx)initfini.s): Add CPPFLAGS, CFLAGS and -g0 to command line of compiler. Patch by Marcus G. Daniels . * sysdeps/generic/sigset.h (__sigandset, __sigorset): Fix typos. Patch by Marcus G. Daniels . * signal/signal.h (_sys_siglist, sys_siglist): Use _NSIG, not NSIG in declaration. Patch by Michael Widenius . * time/strptime.c (strptime_internal): Fix %I format specifier being off by one. Patch by Mark Kettenis . 1997-04-24 12:18 Andreas Schwab * stdlib/lcong48_r.c: Include . * stdlib/seed48_r.c: Likewise. * stdio-common/printf_size.c (printf_size): Correct type of `units' and make robust against future changes. 1997-04-23 18:58 Andreas Schwab * sysdeps/libm-ieee754/s_cproj.c: Use isfinite instead of finite. * sysdeps/libm-ieee754/s_cprojl.c: Likewise. * sysdeps/libm-ieee754/s_cprojf.c: Likewise. 1997-04-23 18:53 Andreas Schwab * manual/arith.texi, manual/math.texi: Use @defmumblex for additional description headers. * manual/xtract-typefun.awk: Recognize them. 1997-04-22 15:58 Andreas Jaeger * stdio-common/printf_size.c (printf_size): Correct size of array units. --- csu/Makefile | 36 +++++++++++++++--------------- csu/abi-note.S | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 18 deletions(-) create mode 100644 csu/abi-note.S (limited to 'csu') diff --git a/csu/Makefile b/csu/Makefile index cba8a4a5f5..9664821ec4 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -36,25 +36,12 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \ $(csu-dummies)) install-lib = $(start-installed-name) g$(start-installed-name) \ $(csu-dummies) -distribute = initfini.c gmon-start.c start.c defs.awk +distribute = initfini.c gmon-start.c start.c defs.awk abi-note.S abi-tag.h all: # Make this the default target; it will be defined in Rules. include ../Makeconfig -ifneq ($(elf),yes) - -# When not using ELF, there is just one startfile, called crt0.o. -start-installed-name = crt0.o - -else - -# In the ELF universe, crt0.o is called crt1.o, and there are -# some additional bizarre files. -start-installed-name = crt1.o -have-initfini = yes - -endif ifeq ($(have-initfini),yes) @@ -75,7 +62,8 @@ $(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h $(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@ $(objpfx)initfini.s: initfini.c - $(CC) -S -fPIC -finhibit-size-directive $(no-exceptions) $< -o $@ + $(CC) $(CPPFLAGS) $(CFLAGS) -g0 -S -fPIC -finhibit-size-directive \ + $(no-exceptions) $< -o $@ $(objpfx)crti.S: $(objpfx)initfini.s sed -n -e '1,/@HEADER_ENDS/p' \ @@ -95,19 +83,31 @@ endif include ../Rules +define link-relocatable +$(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 the kernel ABI the binaries linked with this library will require. +$(objpfx)$(start-installed-name): $(objpfx)start.o $(objpfx)abi-note.o + $(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 $@ + rm -f $@ ln $< $@ endif +endif # The profiling startfile is made by linking together the normal # startfile with gmon-start.o, which defines a constructor function # to turn on profiling code at startup. -$(objpfx)g$(start-installed-name): $(objpfx)start.o $(objpfx)gmon-start.o - $(CC) -nostdlib -nostartfiles -r -o $@ $^ +$(objpfx)g$(start-installed-name): $(objpfx)$(start-installed-name) \ + $(objpfx)gmon-start.o + $(link-relocatable) # These extra files are sometimes expected by system standard linking # procedures, but we have nothing for them to do. So compile empty files. diff --git a/csu/abi-note.S b/csu/abi-note.S new file mode 100644 index 0000000000..baa409de4d --- /dev/null +++ b/csu/abi-note.S @@ -0,0 +1,69 @@ +/* Special .init and .fini section support. + Copyright (C) 1997 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 modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Library General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + The GNU C Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +/* The basic layout of note sections is specified by the ELF format. */ + +#define ELF_NOTE_BEGIN(sectname, sectflags, type, name) \ + .section sectname, sectflags; \ + .align ALIGNARG(2); /* Notes are 4-byte aligned. */ \ + .long 1f - 0f; /* 32-bit word: length of name field */ \ + .long 3f - 2f; /* 32-bit word: length of desc field */ \ + .long (type); /* 32-bit word: vendor-defined type field */ \ +0: .asciz name; /* null-terminated string, any length: name */\ +1: .align ALIGNARG(2); /* Name data padded to 4-byte alignment. */ \ +2: /* Here follows the "note descriptor" data, whose format \ + is not specified by ELF. The vendor name and type field \ + indicate what sort of data is found here. */ + +#define ELF_NOTE_END \ +3: .align ALIGNARG(2) /* Pad to 4-byte align the next note. */ + + +/* The linker (GNU ld 2.8 and later) recognize an allocated section whose + name begins with `.note' and creates a PT_NOTE program header entry + pointing at it. + + Such a program header is the canonical way (at least in the free OS + community) to identify the OS environment ABI that the executable was + created for. The ELF note information identifies a particular OS or + coordinated development effort within which the ELF header's e_machine + value plus (for dynamically linked programs) the PT_INTERP dynamic + linker name and DT_NEEDED shared library names fully identify the + runtime environment required by an executable. + + The GNU project and cooperating development efforts (including the Linux + community) use a vendor name string of "GNU", and a note type field with + value 1 for a note descriptor that indicates ABI requirements. */ + +#include /* OS-specific ABI tag value */ + +ELF_NOTE_BEGIN(".note.ABI-tag", "a", 1, "GNU") + .long ABI_TAG +ELF_NOTE_END -- cgit v1.2.3