Skip to content

Commit

Permalink
update from main archive 960105
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Jan 6, 1997
1 parent 6f9e700 commit df4ef2a
Show file tree
Hide file tree
Showing 131 changed files with 5,585 additions and 1,839 deletions.
9 changes: 1 addition & 8 deletions MakeTAGS
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,7 @@ else
$(extract)
endif

#$P/siglist.pot: $(common-objpfx)stdio-common/siglist.c; $(extract)
$P/siglist.pot: siglist.c; $(extract)

# Extract all strings from this file; its strings are not marked.
# Their surroundings are also not interesting.
XGETTEXTFLAGS-siglist.pot = -a --no-location

all-pot = $P/libc-top.pot $P/subdirs.pot $P/siglist.pot
all-pot = $P/libc-top.pot $P/subdirs.pot

ifndef subdir
# Collect all the subdir messages, massaging the file names in comments
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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
Expand Down Expand Up @@ -38,6 +38,7 @@ endef

configure: configure.in aclocal.m4; $(autoconf-it)
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
config.status: configure version.h; $(SHELL) ./config.status --recheck

include Makeconfig

Expand Down Expand Up @@ -94,6 +95,7 @@ install-others = $(includedir)/gnu/stubs.h
ifeq (yes,$(build-shared))
install-others += $(includedir)/gnu/lib-names.h
endif
install-bin = glibcbug

ifeq (yes,$(gnu-ld))
libc-init = set-init
Expand Down Expand Up @@ -206,6 +208,11 @@ $(includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
rm -f $(objpfx)lib-names.h
endif

# The `glibcbug' script contains the version number and it shall be rebuild
# whenever this changes or the `glibcbug.in' file.
glibcbug: glibcbug.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

# This makes the Info or DVI file of the documentation from the Texinfo source.
.PHONY: info dvi
info dvi:
Expand Down
37 changes: 19 additions & 18 deletions catgets/gencat.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
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.
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.
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.
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, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
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, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */

#ifdef HAVE_CONFIG_H
# include <config.h>
Expand Down Expand Up @@ -170,7 +170,7 @@ main (int argc, char *argv[])
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"), "1996");
"), "1996, 1997");
printf (_("Written by %s.\n"), "Ulrich Drepper");

exit (EXIT_SUCCESS);
Expand Down Expand Up @@ -221,7 +221,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n\
is -, output is written to standard output.\n"),
program_invocation_name, program_invocation_name);
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
fputs (gettext ("\
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
stdout);
}

Expand Down Expand Up @@ -270,7 +271,7 @@ read_input_file (struct catalog *current, const char *fname)
current->last_set = 0;
current->current_set = find_set (current, NL_SETD);

#define obstack_chunk_alloc xmalloc
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
obstack_init (&current->mem_pool);
}
Expand Down
8 changes: 6 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,9 @@ else
config_makefile=Makefile
fi

VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`


trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -1995,7 +1998,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "config.make ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "config.make glibcbug ${config_makefile} ${config_uname} config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
Expand Down Expand Up @@ -2067,6 +2070,7 @@ s%@shared@%$shared%g
s%@profile@%$profile%g
s%@omitfp@%$omitfp%g
s%@DEFINES@%$DEFINES%g
s%@VERSION@%$VERSION%g
CEOF
EOF
Expand Down Expand Up @@ -2108,7 +2112,7 @@ EOF

cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"config.make ${config_makefile} ${config_uname}"}
CONFIG_FILES=\${CONFIG_FILES-"config.make glibcbug ${config_makefile} ${config_uname}"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Expand Down
5 changes: 4 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -732,5 +732,8 @@ else
config_makefile=Makefile
fi

AC_OUTPUT(config.make ${config_makefile} ${config_uname}, ,
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
AC_SUBST(VERSION)

AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
[echo '$config_vars' >> config.make])
7 changes: 4 additions & 3 deletions db/makedb.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* makedb -- create simple DB database from textual input.
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
Expand Down Expand Up @@ -121,7 +121,7 @@ main (argc, argv)
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"), "1996");
"), "1996, 1997");
printf (_("Written by %s.\n"), "Ulrich Drepper");

exit (EXIT_SUCCESS);
Expand Down Expand Up @@ -224,7 +224,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
If INPUT-FILE is -, input is read from standard input.\n"),
program_invocation_name, program_invocation_name,
program_invocation_name);
fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
fputs (gettext ("\
Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
stdout);
}

Expand Down
74 changes: 56 additions & 18 deletions elf/dl-deps.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Load the dependencies of a mapped object.
Copyright (C) 1996 Free Software Foundation, Inc.
Copyright (C) 1996, 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
Expand Down Expand Up @@ -32,33 +32,65 @@ _dl_map_object_deps (struct link_map *map,
struct link_map *map;
struct list *next;
};
struct list head[1 + npreloads], *tailp, *scanp;
struct list head[2 + npreloads], *tailp, *scanp;
struct list duphead, *duptailp;
unsigned int nlist;
unsigned int nduplist;
unsigned int nlist, naux, i;
inline void preload (struct link_map *map)
{
head[nlist].next = &head[nlist + 1];
head[nlist++].map = map;

/* Start the search list with one element: MAP itself. */
head[0].map = map;
/* We use `l_reserved' as a mark bit to detect objects we have
already put in the search list and avoid adding duplicate
elements later in the list. */
map->l_reserved = 1;
}

/* We use `l_reserved' as a mark bit to detect objects we have already
put in the search list and avoid adding duplicate elements later in
the list. */
map->l_reserved = 1;
naux = nlist = 0;

/* Add the preloaded items after MAP but before any of its dependencies. */
for (nlist = 0; nlist < npreloads; ++nlist)
#define AUXTAG (DT_NUM + DT_PROCNUM + DT_EXTRATAGIDX (DT_AUXILIARY))

if (map->l_info[AUXTAG])
{
head[nlist].next = &head[nlist + 1];
head[nlist + 1].map = preloads[nlist];
preloads[nlist]->l_reserved = 1;
/* 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;
}
}

/* Start the search list with one element: MAP itself. */
preload (map);

/* Add the preloaded items after MAP but before any of its dependencies. */
for (i = 0; i < npreloads; ++i)
preload (preloads[i]);

/* Terminate the lists. */
head[nlist].next = NULL;
head[nlist - 1].next = NULL;
duphead.next = NULL;

/* Start here for adding dependencies to the list. */
tailp = &head[nlist++];
tailp = &head[nlist - 1];

/* Until now we have the same number of libraries in the normal and
the list with duplicates. */
Expand Down Expand Up @@ -104,7 +136,7 @@ _dl_map_object_deps (struct link_map *map,
dep->l_reserved = 1;
}

/* In any case Append DEP to the duplicates search list. */
/* In any case append DEP to the duplicates search list. */
duptailp->next = alloca (sizeof *duptailp);
duptailp = duptailp->next;
duptailp->map = dep;
Expand All @@ -117,6 +149,9 @@ _dl_map_object_deps (struct link_map *map,
/* Store the search list we built in the object. It will be used for
searches in the scope of this object. */
map->l_searchlist = malloc (nlist * sizeof (struct link_map *));
if (map->l_searchlist == NULL)
_dl_signal_error (ENOMEM, map->l_name,
"cannot allocate symbol search list");
map->l_nsearchlist = nlist;

nlist = 0;
Expand All @@ -130,9 +165,12 @@ _dl_map_object_deps (struct link_map *map,
}

map->l_dupsearchlist = malloc (nduplist * sizeof (struct link_map *));
if (map->l_dupsearchlist == NULL)
_dl_signal_error (ENOMEM, map->l_name,
"cannot allocate symbol search list");
map->l_ndupsearchlist = nduplist;

for (nlist = 0; nlist < npreloads + 1; ++nlist)
for (nlist = 0; nlist < naux + 1 + npreloads; ++nlist)
map->l_dupsearchlist[nlist] = head[nlist].map;
for (scanp = duphead.next; scanp; scanp = scanp->next)
map->l_dupsearchlist[nlist++] = scanp->map;
Expand Down
9 changes: 5 additions & 4 deletions elf/dl-error.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Error handling for runtime dynamic linker.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 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
Expand Down Expand Up @@ -76,21 +76,22 @@ _dl_catch_error (char **errstring,
void (*operate) (void))
{
int errcode;
struct catch c = { errstring: NULL, objname: NULL };
struct catch *old, c = { errstring: NULL, objname: NULL };

old = catch;
errcode = setjmp (c.env);
if (errcode == 0)
{
catch = &c;
(*operate) ();
catch = NULL;
catch = old;
*errstring = NULL;
*objname = NULL;
return 0;
}

/* We get here only if we longjmp'd out of OPERATE. */
catch = NULL;
catch = old;
*errstring = c.errstring;
*objname = c.objname;
return errcode == -1 ? 0 : errcode;
Expand Down
9 changes: 6 additions & 3 deletions elf/dynamic-link.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Inline functions for dynamic linking.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 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
Expand All @@ -25,11 +25,12 @@
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */

static inline void __attribute__ ((unused))
elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
elf_get_dynamic_info (ElfW(Dyn) *dyn,
ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_EXTRANUM])
{
unsigned int i;

for (i = 0; i < DT_NUM + DT_PROCNUM; ++i)
for (i = 0; i < DT_NUM + DT_PROCNUM + DT_EXTRANUM; ++i)
info[i] = NULL;

if (! dyn)
Expand All @@ -42,6 +43,8 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM])
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_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM] = dyn;
else
assert (! "bad dynamic tag");
dyn++;
Expand Down
10 changes: 9 additions & 1 deletion elf/elf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ian Lance Taylor <ian@cygnus.com>.
Expand Down Expand Up @@ -464,6 +464,14 @@ typedef struct
#define DT_HIPROC 0x7fffffff /* End of processor-specific */
#define DT_PROCNUM DT_MIPS_NUM /* Most used by any processor */

/* Sun added these machine-independent extensions in the "processor-specific"
range. Be compatible. */
#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */
#define DT_FILTER 0x7fffffff /* Shared object to get values from */
#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
#define DT_EXTRANUM 3


/* Auxiliary vector. */

/* This vector is normally only used by the program interpreter. The
Expand Down
Loading

0 comments on commit df4ef2a

Please sign in to comment.