diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1997-02-03 03:18:58 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1997-02-03 03:18:58 +0000 |
| commit | 1228ed5cd520342af906f07eb1b21be82d0b40d0 (patch) | |
| tree | de90f47d4acf5c7d92e68d9e5bf4e43a33144a17 | |
| parent | c0e4567461c09ba47ddbc20e6b0ab09bdb0237ab (diff) | |
| download | glibc-1228ed5cd520342af906f07eb1b21be82d0b40d0.tar.xz glibc-1228ed5cd520342af906f07eb1b21be82d0b40d0.zip | |
update from main archive 970202cvs/libc-970203
1997-02-03 02:33 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-deps.c (_dl_map_object_deps): Handle multiple AUXILIARY
entries. This is still no complete implementation since AUXILIARY
entries in other shared objects are not yet handled.
* libio/libio.h (_IO_cookie_io_functions_t): Move to C++ protected
place.
* po/es.po: Update.
* po/fr.po: Update.
* po/nl.po: Update.
* time/Makefile: Better cross-compile support. Avoid test which
cannot be run.
(CFLAGS-tzset.c): New variable. Overwrite TZDEFAULT value from
tzfile.h file.
* time/tzfile.c (__tzfile_read): Allow TZDEFAULT start with '/' even
in SUID programs.
* time/tzset.c (__tzset_internal): If TZ envvar is not set use same
default values as in tzfile.c.
* elf/dynamic-link.h (elf_get_dynamic_info): Recognize versioning
tags.
* elf/link.h: Likewise.
* elf/elf.h: Add tag definitions and data structures for versioning.
1997-02-03 02:17 Ulrich Drepper <drepper@cygnus.com>
* nis/rpcsvc/yp.x (struct ypresp_key_val): There is not stupid
"Sun bug". This is the order of elements also used by 4.4BSD.
* nis/rpcsvc/yp.h: Likewise.
Reported by HJ Lu.
1997-02-02 12:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* sunrpc/Makefile ($(objpfx)x%.h, $(objpfx)x%.c): Add "@:" as
action.
* Makefile (install): Pass installation directories as arguments
to ldconfig.
1997-02-02 23:15 Ulrich Drepper <drepper@cygnus.com>
* malloc/malloc.c (__after_morecore_hook): New variable.
(malloc_extend_top): Call __after_morecore_hook if set.
(main_trim): Likewise.
* malloc/malloc.h: Add declaration of __after_morecore_hook.
Suggested by Marcus Daniels.
1997-02-02 23:00 Marcus G. Daniels <marcus@tdb.com>
* malloc/malloc.c (rEALLOc): Protect tsd_setspecific call by
#ifndef NO_THREADS.
(mallinfo): Likewise.
* malloc/malloc.c (__morecore): Make external since it is used in
programs.
1997-02-02 15:10 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/statbuf.h (struct stat): Make st_dev field
unsigned.
1997-02-01 23:36 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/stxncpy.S ($unaligned) [src % 8 > dst % 8]: Don't
use t6 as a temporary; it contains bits we still need in $u_head.
1997-01-31 15:05 John Bowman <bowman@ipp-garching.mpg.de>
* sysdeps/i386/fpu/__math.h [__USE_MISC]: Don't declare prototypes
using __ prefix. Add prototype for log1p.
| -rw-r--r-- | ChangeLog | 74 | ||||
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | README | 4 | ||||
| -rw-r--r-- | elf/dl-deps.c | 73 | ||||
| -rw-r--r-- | elf/dynamic-link.h | 10 | ||||
| -rw-r--r-- | elf/elf.h | 84 | ||||
| -rw-r--r-- | elf/link.h | 7 | ||||
| -rw-r--r-- | libio/libio.h | 18 | ||||
| -rw-r--r-- | malloc/malloc.c | 21 | ||||
| -rw-r--r-- | malloc/malloc.h | 1 | ||||
| -rw-r--r-- | nis/rpcsvc/yp.h | 224 | ||||
| -rw-r--r-- | nis/rpcsvc/yp.x | 57 | ||||
| -rw-r--r-- | po/es.po | 430 | ||||
| -rw-r--r-- | po/fr.po | 6 | ||||
| -rw-r--r-- | po/nl.po | 68 | ||||
| -rw-r--r-- | sunrpc/Makefile | 2 | ||||
| -rw-r--r-- | sysdeps/alpha/stxncpy.S | 6 | ||||
| -rw-r--r-- | sysdeps/i386/fpu/__math.h | 25 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/statbuf.h | 6 | ||||
| -rw-r--r-- | time/Makefile | 16 | ||||
| -rw-r--r-- | time/tzfile.c | 24 | ||||
| -rw-r--r-- | time/tzset.c | 14 |
22 files changed, 751 insertions, 421 deletions
@@ -1,3 +1,77 @@ +1997-02-03 02:33 Ulrich Drepper <drepper@cygnus.com> + + * elf/dl-deps.c (_dl_map_object_deps): Handle multiple AUXILIARY + entries. This is still no complete implementation since AUXILIARY + entries in other shared objects are not yet handled. + + * libio/libio.h (_IO_cookie_io_functions_t): Move to C++ protected + place. + + * po/es.po: Update. + * po/fr.po: Update. + * po/nl.po: Update. + + * time/Makefile: Better cross-compile support. Avoid test which + cannot be run. + (CFLAGS-tzset.c): New variable. Overwrite TZDEFAULT value from + tzfile.h file. + * time/tzfile.c (__tzfile_read): Allow TZDEFAULT start with '/' even + in SUID programs. + * time/tzset.c (__tzset_internal): If TZ envvar is not set use same + default values as in tzfile.c. + + * elf/dynamic-link.h (elf_get_dynamic_info): Recognize versioning + tags. + * elf/link.h: Likewise. + * elf/elf.h: Add tag definitions and data structures for versioning. + +1997-02-03 02:17 Ulrich Drepper <drepper@cygnus.com> + + * nis/rpcsvc/yp.x (struct ypresp_key_val): There is not stupid + "Sun bug". This is the order of elements also used by 4.4BSD. + * nis/rpcsvc/yp.h: Likewise. + Reported by HJ Lu. + +1997-02-02 12:13 H.J. Lu <hjl@gnu.ai.mit.edu> + + * sunrpc/Makefile ($(objpfx)x%.h, $(objpfx)x%.c): Add "@:" as + action. + + * Makefile (install): Pass installation directories as arguments + to ldconfig. + +1997-02-02 23:15 Ulrich Drepper <drepper@cygnus.com> + + * malloc/malloc.c (__after_morecore_hook): New variable. + (malloc_extend_top): Call __after_morecore_hook if set. + (main_trim): Likewise. + * malloc/malloc.h: Add declaration of __after_morecore_hook. + Suggested by Marcus Daniels. + +1997-02-02 23:00 Marcus G. Daniels <marcus@tdb.com> + + * malloc/malloc.c (rEALLOc): Protect tsd_setspecific call by + #ifndef NO_THREADS. + (mallinfo): Likewise. + + * malloc/malloc.c (__morecore): Make external since it is used in + programs. + +1997-02-02 15:10 Ulrich Drepper <drepper@cygnus.com> + + * sysdeps/unix/sysv/linux/statbuf.h (struct stat): Make st_dev field + unsigned. + +1997-02-01 23:36 Richard Henderson <rth@tamu.edu> + + * sysdeps/alpha/stxncpy.S ($unaligned) [src % 8 > dst % 8]: Don't + use t6 as a temporary; it contains bits we still need in $u_head. + +1997-01-31 15:05 John Bowman <bowman@ipp-garching.mpg.de> + + * sysdeps/i386/fpu/__math.h [__USE_MISC]: Don't declare prototypes + using __ prefix. Add prototype for log1p. + 1997-02-02 00:39 Ulrich Drepper <drepper@cygnus.com> * dirent/dirent.h: Add description _DIRENT_HAVE_D_TYPE. @@ -119,7 +119,7 @@ ifeq (no,$(cross-compiling)) ifeq (yes,$(build-shared)) install: test ! -x $(common-objpfx)elf/ldconfig || \ - $(common-objpfx)elf/ldconfig -d + $(common-objpfx)elf/ldconfig -d $(inst_slibdir) $(inst_libdir) endif endif @@ -1,4 +1,4 @@ -This directory contains the version 2.0 test release of the GNU C Library. +This directory contains the version 2.0.1 test release of the GNU C Library. Many bugs have been fixed since the last release. Some bugs surely remain. @@ -46,7 +46,7 @@ provides the Unix `crypt' function, plus some other entry points. Because of the United States export restriction on DES implementations, we are distributing this code separately from the rest of the C library. There is an extra distribution tar file just for crypt; it is -called `glibc-crypt-2.0.tar.gz'. You can just unpack the crypt +called `glibc-crypt-2.0.1.tar.gz'. You can just unpack the crypt distribution along with the rest of the C library and build; you can also build the library without getting crypt. Users outside the USA can get the crypt distribution via anonymous FTP from ftp.ifi.uio.no diff --git a/elf/dl-deps.c b/elf/dl-deps.c index f034196762..7a6772979b 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -32,7 +32,7 @@ _dl_map_object_deps (struct link_map *map, struct link_map *map; struct list *next; }; - struct list head[2 + npreloads], *tailp, *scanp; + struct list *head, *tailp, *scanp; struct list duphead, *duptailp; unsigned int nduplist; unsigned int nlist, naux, i; @@ -49,36 +49,57 @@ _dl_map_object_deps (struct link_map *map, naux = nlist = 0; -#define AUXTAG (DT_NUM + DT_PROCNUM + DT_EXTRATAGIDX (DT_AUXILIARY)) + /* XXX The AUXILIARY implementation isn't correct in the moment. XXX + XXX The problem is that we currently do not handle auxiliary XXX + XXX entries in the loaded objects. XXX */ +#define AUXTAG (DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM \ + + DT_EXTRATAGIDX (DT_AUXILIARY)) + + /* First determine the number of auxiliary objects we have to load. */ if (map->l_info[AUXTAG]) { - /* There is an auxiliary library specified. We try to load it, - and if we can, use its symbols in preference to our own. - But if we can't load it, we just silently ignore it. - XXX support multiple DT_AUXILIARYs? - */ - struct link_map *aux; - void openaux (void) - { - const char *strtab - = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); - aux = _dl_map_object (map, strtab + map->l_info[AUXTAG]->d_un.d_val, - map->l_type == lt_executable ? lt_library : - map->l_type, trace_mode); - } - char *errstring; - const char *objname; - if (! _dl_catch_error (&errstring, &objname, &openaux)) - { - /* The auxiliary object is actually there. Use it - as the first search element, even before MAP itself. */ - preload (aux); - naux = 1; - } + ElfW(Dyn) *d; + for (d = map->l_ld; d->d_tag != DT_NULL; ++d) + if (d->d_tag == DT_AUXILIARY) + ++naux; + } + + /* Now we can allocate the array for the linker maps. */ + head = (struct list *) alloca (sizeof (struct list) + * (naux + npreloads + 2)); + + /* Load the auxiliary objects, even before the object itself. */ + if (map->l_info[AUXTAG]) + { + /* There is at least one auxiliary library specified. We try to + load it, and if we can, use its symbols in preference to our + own. But if we can't load it, we just silently ignore it. */ + const char *strtab + = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr); + ElfW(Dyn) *d; + + for (d = map->l_ld; d->d_tag != DT_NULL; ++d) + if (d->d_tag == DT_AUXILIARY) + { + struct link_map *aux; + void openaux (void) + { + aux = _dl_map_object (map, strtab + d->d_un.d_val, + (map->l_type == lt_executable + ? lt_library : map->l_type), + trace_mode); + } + char *errstring; + const char *objname; + if (! _dl_catch_error (&errstring, &objname, openaux)) + /* The auxiliary object is actually there. Use it as + the first search element, even before MAP itself. */ + preload (aux); + } } - /* Start the search list with one element: MAP itself. */ + /* Next load MAP itself. */ preload (map); /* Add the preloaded items after MAP but before any of its dependencies. */ diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index c613f824d8..1d134ddf2f 100644 --- a/elf/dynamic-link.h +++ b/elf/dynamic-link.h @@ -26,11 +26,12 @@ static inline void __attribute__ ((unused)) elf_get_dynamic_info (ElfW(Dyn) *dyn, - ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_EXTRANUM]) + ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + + DT_EXTRANUM]) { unsigned int i; - for (i = 0; i < DT_NUM + DT_PROCNUM + DT_EXTRANUM; ++i) + for (i = 0; i < DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM; ++i) info[i] = NULL; if (! dyn) @@ -43,8 +44,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, else if (dyn->d_tag >= DT_LOPROC && dyn->d_tag < DT_LOPROC + DT_PROCNUM) info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn; + else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM) + info[DT_VERSIONTAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn; else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM) - info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn; + info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM + + DT_VERSIONTAGNUM] = dyn; else assert (! "bad dynamic tag"); dyn++; @@ -232,6 +232,11 @@ typedef struct #define SHT_SHLIB 10 /* Reserved */ #define SHT_DYNSYM 11 /* Dynamic linker symbol table */ #define SHT_NUM 12 /* Number of defined types. */ +#define SHT_LOSUNW 0x6ffffffd /* Sun-specific low bound. */ +#define SHT_GNU_verdef 0x6ffffffd /* Version definition section. */ +#define SHT_GNU_verneed 0x6ffffffe /* Version needs section. */ +#define SHT_GNU_versym 0x6fffffff /* Version symbol table. */ +#define SHT_HISUNW 0x6fffffff /* Sun-specific high bound. */ #define SHT_LOPROC 0x70000000 /* Start of processor-specific */ #define SHT_HIPROC 0x7fffffff /* End of processor-specific */ #define SHT_LOUSER 0x80000000 /* Start of application-specific */ @@ -464,6 +469,20 @@ typedef struct #define DT_HIPROC 0x7fffffff /* End of processor-specific */ #define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */ +/* The versioning entry types. The next are defined as part of the + GNU extension. */ +#define DT_VERSYM 0x6ffffff0 + +/* These were chosen by Sun. */ +#define DT_VERDEF 0x6ffffffc /* Address of version definition + table */ +#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */ +#define DT_VERNEED 0x6ffffffe /* Address of table with needed + versions */ +#define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */ +#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ +#define DT_VERSIONTAGNUM 16 + /* Sun added these machine-independent extensions in the "processor-specific" range. Be compatible. */ #define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */ @@ -471,6 +490,71 @@ typedef struct #define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) #define DT_EXTRANUM 3 +/* Version definition sections. */ + +typedef struct +{ + Elf32_Half vd_version; /* Version revision */ + Elf32_Half vd_flags; /* Version information */ + Elf32_Half vd_ndx; /* Version Index */ + Elf32_Half vd_cnt; /* Number of associated aux entries */ + Elf32_Word vd_hash; /* Version name hash value */ + Elf32_Word vd_aux; /* Offset in bytes to verdaux array */ + Elf32_Word vd_next; /* Offset in bytes to next verdef + entry */ +} Elf32_Verdef; + +/* Legal values for vd_version (version revision). */ +#define VER_DEF_NONE 0 /* No version */ +#define VER_DEF_CURRENT 1 /* Current version */ +#define VER_DEF_NUM 2 /* Given version number */ + +/* Legal values for vd_flags (version information flags). */ +#define VER_FLG_BASE 0x1 /* Version definition of file itself */ +#define VER_FLG_WEAK 0x2 /* Weak version identifier */ + +/* Auxialiary version information. */ + +typedef struct +{ + Elf32_Addr vda_name; /* Version or dependency names */ + Elf32_Word vda_next; /* Offset in bytes to next verdaux + entry */ +} Elf32_Verdaux; + +/* Version dependency section. */ + +typedef struct +{ + Elf32_Half vn_version; /* Version of structure */ + Elf32_Half vn_cnt; /* Number of associated aux entries */ + Elf32_Addr vn_file; /* Offset of filename for this + dependency */ + Elf32_Word vn_aux; /* Offset in bytes to vernaux array */ + Elf32_Word vn_next; /* Offset in bytes to next verneed + entry */ +} Elf32_Verneed; + +/* Legal values for vn_version (version revision). */ +#define VER_NEED_NONE 0 /* No version */ +#define VER_NEED_CURRENT 1 /* Current version */ +#define VER_NEED_NUM 2 /* Given version number */ + +/* Auxiliary needed version information. */ + +typedef struct +{ + Elf32_Word vna_hash; /* Hash value of dependency name */ + Elf32_Half vna_flags; /* Dependency specific information */ + Elf32_Half vna_other; /* Unused */ + Elf32_Addr vna_name; /* Dependency name string offset */ + Elf32_Word vna_next; /* Offset in bytes to next vernaux + entry */ +} Elf32_Vernaux; + +/* Legal values for vna_flags. */ +#define VER_FLG_WEAK 0x2 /* Weak verison identifier */ + /* Auxiliary vector. */ diff --git a/elf/link.h b/elf/link.h index 95d8f0912d..b05ecca199 100644 --- a/elf/link.h +++ b/elf/link.h @@ -99,9 +99,12 @@ struct link_map [0,DT_NUM) are indexed by the processor-independent tags. [DT_NUM,DT_NUM+DT_PROCNUM) are indexed by the tag minus DT_LOPROC. [DT_NUM+DT_PROCNUM,DT_NUM+DT_PROCNUM+DT_EXTRANUM) are indexed - by DT_EXTRATAGIDX(tagvalue) (see <elf.h>). */ + by DT_EXTRATAGIDX(tagvalue) and + [DT_NUM+DT_PROCNUM+DT_VERSIONTAGNUM, + DT_NUM+DT_PROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM) + are indexed by DT_EXTRATAGIDX(tagvalue) (see <elf.h>). */ - ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM + DT_EXTRANUM]; + ElfW(Dyn) *l_info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM]; const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */ ElfW(Addr) l_entry; /* Entry point location. */ ElfW(Half) l_phnum; /* Number of program header entries. */ diff --git a/libio/libio.h b/libio/libio.h index c51cad4234..d0a76c34b2 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -149,15 +149,6 @@ the executable file might be covered by the GNU General Public License. */ struct _IO_jump_t; struct _IO_FILE; -/* Define the user-visible type, with user-friendly member names. */ -typedef struct -{ - _IO_ssize_t (*read) __P ((struct _IO_FILE *, void *, _IO_ssize_t)); - _IO_ssize_t (*write) __P ((struct _IO_FILE *, const void *, _IO_ssize_t)); - _IO_fpos_t (*seek) __P ((struct _IO_FILE *, _IO_off_t, int)); - int (*close) __P ((struct _IO_FILE *)); -} _IO_cookie_io_functions_t; - /* Handle lock. */ #ifdef _IO_MTSAFE_IO #include <stdio-lock.h> @@ -236,6 +227,15 @@ extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_; #define _IO_stderr ((_IO_FILE*)(&_IO_stderr_)) +/* Define the user-visible type, with user-friendly member names. */ +typedef struct +{ + _IO_ssize_t (*read) __P ((struct _IO_FILE *, void *, _IO_ssize_t)); + _IO_ssize_t (*write) __P ((struct _IO_FILE *, const void *, _IO_ssize_t)); + _IO_fpos_t (*seek) __P ((struct _IO_FILE *, _IO_off_t, int)); + int (*close) __P ((struct _IO_FILE *)); +} _IO_cookie_io_functions_t; + /* Special file type for fopencookie function. */ struct _IO_cookie_file { struct _IO_FILE file; diff --git a/malloc/malloc.c b/malloc/malloc.c index 57867c90c6..0380527f64 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -820,12 +820,12 @@ do { \ #if __STD_C Void_t * __default_morecore (ptrdiff_t); -static Void_t *(*__morecore)(ptrdiff_t) = __default_morecore; +Void_t *(*__morecore)(ptrdiff_t) = __default_morecore; #else Void_t * __default_morecore (); -static Void_t *(*__morecore)() = __default_morecore; +Void_t *(*__morecore)() = __default_morecore; #endif @@ -1615,6 +1615,7 @@ __malloc_ptr_t weak_variable (*__realloc_hook) __MALLOC_P ((__malloc_ptr_t __ptr, size_t __size)) = realloc_hook_ini; __malloc_ptr_t weak_variable (*__memalign_hook) __MALLOC_P ((size_t __size, size_t __alignment)) = memalign_hook_ini; +void weak_variable (*__after_morecore_hook) __MALLOC_P ((void)) = NULL; /* Activate a standard set of debugging hooks. */ void @@ -2215,6 +2216,10 @@ static void malloc_extend_top(ar_ptr, nb) arena *ar_ptr; INTERNAL_SIZE_T nb; (brk < old_end && old_top != initial_top(&main_arena))) return; + /* Call the `morecore' hook if necessary. */ + if (__after_morecore_hook) + (*__after_morecore_hook) (); + sbrked_mem += sbrk_size; if (brk == old_end) { /* can just add bytes to current top */ @@ -2243,6 +2248,10 @@ static void malloc_extend_top(ar_ptr, nb) arena *ar_ptr; INTERNAL_SIZE_T nb; new_brk = (char*)(MORECORE (correction)); if (new_brk == (char*)(MORECORE_FAILURE)) return; |
