mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
1999-01-21 Ulrich Drepper <drepper@cygnus.com> * elf/dl-close.c: Rewrite the way adding to the global scope works to handle error cases better than the last change. The l_global flag is now only set when the object is actually counted in the global scope list. * elf/dl-deps.c: Likewise. * elf/dl-open.c: Likewise.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
1999-01-21 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* elf/dl-close.c: Rewrite the way adding to the global scope works
|
||||||
|
to handle error cases better than the last change.
|
||||||
|
The l_global flag is now only set when the object is actually
|
||||||
|
counted in the global scope list.
|
||||||
|
* elf/dl-deps.c: Likewise.
|
||||||
|
* elf/dl-open.c: Likewise.
|
||||||
|
|
||||||
1999-01-20 Philip Blundell <pb@nexus.co.uk>
|
1999-01-20 Philip Blundell <pb@nexus.co.uk>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/arm/sigaction.c: New file.
|
* sysdeps/unix/sysv/linux/arm/sigaction.c: New file.
|
||||||
|
18
FAQ.in
18
FAQ.in
@ -849,16 +849,16 @@ Another problem is that older binaries that were linked statically against
|
|||||||
glibc 2.0 will reference the older nss modules (libnss_files.so.1 instead of
|
glibc 2.0 will reference the older nss modules (libnss_files.so.1 instead of
|
||||||
libnss_files.so.2), so don't remove them. Also, the old glibc-2.0 compiled
|
libnss_files.so.2), so don't remove them. Also, the old glibc-2.0 compiled
|
||||||
static libraries (libfoo.a) which happen to depend on the older libio
|
static libraries (libfoo.a) which happen to depend on the older libio
|
||||||
behavior will be broken by the glibc 2.1 upgrade. The idea is to produce a
|
behavior will be broken by the glibc 2.1 upgrade. We plan to produce a
|
||||||
libcompat.a that people will be able to use to link in if they want to
|
compatibility library that people will be able to link in if they want
|
||||||
compile a static library generated against glibc 2.0 into a program on a
|
to compile a static library generated against glibc 2.0 into a program
|
||||||
glibc 2.1 system. You should just add -lcompat and you should be fine.
|
on a glibc 2.1 system. You just add -lcompat and you should be fine.
|
||||||
|
|
||||||
The glibc-compat add-on will provide the libnss_* files and other stuff so
|
|
||||||
that it is possible to use static library compiled against glibc 2.0 for
|
|
||||||
development on a glibc 2.1 based system. Please note that this is currently
|
|
||||||
just an experiment, although the nss modules part should work.
|
|
||||||
|
|
||||||
|
The glibc-compat add-on will provide the libcompat.a library, the older
|
||||||
|
nss modules, and a few other files. Together, they should make it
|
||||||
|
possible to do development with old static libraries on a glibc 2.1
|
||||||
|
system. This add-on is still in development. You can get it from <URL>
|
||||||
|
but please keep in mind that it is experimental.
|
||||||
|
|
||||||
? Source and binary incompatibilities, and what to do about them
|
? Source and binary incompatibilities, and what to do about them
|
||||||
|
|
||||||
|
@ -106,36 +106,15 @@ _dl_close (struct link_map *map)
|
|||||||
int cnt = _dl_main_searchlist->r_nlist;
|
int cnt = _dl_main_searchlist->r_nlist;
|
||||||
|
|
||||||
do
|
do
|
||||||
if (--cnt < 0)
|
--cnt;
|
||||||
break;
|
|
||||||
while (_dl_main_searchlist->r_list[cnt] != imap);
|
while (_dl_main_searchlist->r_list[cnt] != imap);
|
||||||
|
|
||||||
if (cnt >= 0)
|
/* The object was already correctly registered. */
|
||||||
{
|
while (++cnt < _dl_main_searchlist->r_nlist)
|
||||||
/* The object was already correctly registered. */
|
_dl_main_searchlist->r_list[cnt - 1]
|
||||||
while (++cnt < _dl_main_searchlist->r_nlist)
|
= _dl_main_searchlist->r_list[cnt];
|
||||||
_dl_main_searchlist->r_list[cnt - 1]
|
|
||||||
= _dl_main_searchlist->r_list[cnt];
|
|
||||||
|
|
||||||
--_dl_main_searchlist->r_nlist;
|
--_dl_main_searchlist->r_nlist;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* This can happen if loading was interrupted by something
|
|
||||||
like a missing symbol in the newly loaded objects. In
|
|
||||||
this case the object is already marked as global but
|
|
||||||
`r_nlist' does not count it in. The pointer is in the
|
|
||||||
`r_list' array so we keep searching in the other
|
|
||||||
direction. */
|
|
||||||
cnt = _dl_main_searchlist->r_nlist;
|
|
||||||
while (_dl_main_searchlist->r_list[cnt] != imap)
|
|
||||||
{
|
|
||||||
++cnt;
|
|
||||||
/* Note that if _dl_global_scope_alloc is zero we
|
|
||||||
should never come here in the first place. */
|
|
||||||
assert (cnt < _dl_global_scope_alloc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We can unmap all the maps at once. We determined the
|
/* We can unmap all the maps at once. We determined the
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Load the dependencies of a mapped object.
|
/* Load the dependencies of a mapped object.
|
||||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -93,6 +93,7 @@ _dl_map_object_deps (struct link_map *map,
|
|||||||
struct list known[1 + npreloads + 1];
|
struct list known[1 + npreloads + 1];
|
||||||
struct list *runp, *utail, *dtail;
|
struct list *runp, *utail, *dtail;
|
||||||
unsigned int nlist, nduplist, i;
|
unsigned int nlist, nduplist, i;
|
||||||
|
unsigned int to_add = 0;
|
||||||
|
|
||||||
inline void preload (struct link_map *map)
|
inline void preload (struct link_map *map)
|
||||||
{
|
{
|
||||||
@ -416,7 +417,6 @@ _dl_map_object_deps (struct link_map *map,
|
|||||||
if (global_scope)
|
if (global_scope)
|
||||||
{
|
{
|
||||||
unsigned int cnt;
|
unsigned int cnt;
|
||||||
unsigned int to_add = 0;
|
|
||||||
struct link_map **new_global;
|
struct link_map **new_global;
|
||||||
|
|
||||||
/* Count the objects we have to put in the global scope. */
|
/* Count the objects we have to put in the global scope. */
|
||||||
@ -479,16 +479,13 @@ _dl_map_object_deps (struct link_map *map,
|
|||||||
for (cnt = 0; cnt < nlist; ++cnt)
|
for (cnt = 0; cnt < nlist; ++cnt)
|
||||||
if (map->l_searchlist.r_list[cnt]->l_global == 0)
|
if (map->l_searchlist.r_list[cnt]->l_global == 0)
|
||||||
{
|
{
|
||||||
map->l_searchlist.r_list[cnt]->l_global = 1;
|
|
||||||
_dl_main_searchlist->r_list[_dl_main_searchlist->r_nlist + to_add]
|
_dl_main_searchlist->r_list[_dl_main_searchlist->r_nlist + to_add]
|
||||||
= map->l_searchlist.r_list[cnt];
|
= map->l_searchlist.r_list[cnt];
|
||||||
++to_add;
|
++to_add;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX Do we have to add something to r_dupsearchlist??? --drepper */
|
/* XXX Do we have to add something to r_dupsearchlist??? --drepper */
|
||||||
|
|
||||||
return to_add;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return to_add;
|
||||||
}
|
}
|
||||||
|
@ -144,9 +144,9 @@ dl_open_worker (void *a)
|
|||||||
(*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv,
|
(*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv,
|
||||||
__environ);
|
__environ);
|
||||||
|
|
||||||
if (new->l_global)
|
/* Now we can make the new map available in the global scope. */
|
||||||
/* Now we can make the new map available in the global scope. */
|
while (global_add-- > 0)
|
||||||
_dl_main_searchlist->r_nlist += global_add;
|
_dl_main_searchlist->r_list[_dl_main_searchlist->r_nlist++]->l_global = 1;
|
||||||
|
|
||||||
if (_dl_sysdep_start == NULL)
|
if (_dl_sysdep_start == NULL)
|
||||||
/* We must be the static _dl_open in libc.a. A static program that
|
/* We must be the static _dl_open in libc.a. A static program that
|
||||||
|
Reference in New Issue
Block a user