mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
* elf/dl-lookup.c (_dl_lookup_symbol): Undefined symbol is no
error if weak. * elf/Makefile (default-rpath): New variable. (CPPFLAGS): Append -DDEFAULT_RPATH=.... * elf/dl-load.c (_dl_map_object): Use DEFAULT_RPATH instead of hard-coded "/lib:/usr/lib".
This commit is contained in:
parent
ec967c06ac
commit
8738e7f8b0
@ -1,5 +1,13 @@
|
|||||||
Wed Nov 15 19:22:07 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
Wed Nov 15 19:22:07 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||||
|
|
||||||
|
* elf/dl-lookup.c (_dl_lookup_symbol): Undefined symbol is no
|
||||||
|
error if weak.
|
||||||
|
|
||||||
|
* elf/Makefile (default-rpath): New variable.
|
||||||
|
(CPPFLAGS): Append -DDEFAULT_RPATH=....
|
||||||
|
* elf/dl-load.c (_dl_map_object): Use DEFAULT_RPATH instead of
|
||||||
|
hard-coded "/lib:/usr/lib".
|
||||||
|
|
||||||
* sysdeps/mach/hurd/dl-sysdep.c: Include _itoa.h from stdio-common
|
* sysdeps/mach/hurd/dl-sysdep.c: Include _itoa.h from stdio-common
|
||||||
instead of stdio.
|
instead of stdio.
|
||||||
(_dl_sysdep_start): If passed user entry is zero and
|
(_dl_sysdep_start): If passed user entry is zero and
|
||||||
|
10
elf/Makefile
10
elf/Makefile
@ -50,6 +50,16 @@ endif
|
|||||||
include ../Rules
|
include ../Rules
|
||||||
|
|
||||||
|
|
||||||
|
# Choose the default search path for the dynamic linker based on
|
||||||
|
# where we will install libraries.
|
||||||
|
ifneq ($(libdir),$(slibdir))
|
||||||
|
default-rpath = $(slibdir):$(libdir)
|
||||||
|
else
|
||||||
|
default-rpath = $(libdir)
|
||||||
|
endif
|
||||||
|
CPPFLAGS += -DDEFAULT_RPATH='"$(default-rpath)"'
|
||||||
|
|
||||||
|
|
||||||
# Link together the dynamic linker into a single relocatable object.
|
# Link together the dynamic linker into a single relocatable object.
|
||||||
# We use this to produce both the ABI-compliant and Linux-compatible
|
# We use this to produce both the ABI-compliant and Linux-compatible
|
||||||
# dynamic linker shared objects below.
|
# dynamic linker shared objects below.
|
||||||
|
@ -139,7 +139,7 @@ _dl_map_object (struct link_map *loader, const char *name)
|
|||||||
if (fd == -1 && ! _dl_secure)
|
if (fd == -1 && ! _dl_secure)
|
||||||
trypath (getenv ("LD_LIBRARY_PATH"));
|
trypath (getenv ("LD_LIBRARY_PATH"));
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
trypath ("/lib:/usr/lib");
|
trypath (DEFAULT_RPATH);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ _dl_lookup_symbol (const char *undef_name, const Elf32_Sym **ref,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (weak_value.s == NULL)
|
if (weak_value.s == NULL && ELF32_ST_BIND ((*ref)->st_info) != STB_WEAK)
|
||||||
{
|
{
|
||||||
const char msg[] = "undefined symbol: ";
|
const char msg[] = "undefined symbol: ";
|
||||||
char buf[sizeof msg + strlen (undef_name)];
|
char buf[sizeof msg + strlen (undef_name)];
|
||||||
|
Loading…
Reference in New Issue
Block a user