aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-lookup.c12
-rw-r--r--elf/ldd.bash.in2
2 files changed, 13 insertions, 1 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index f85aa373c2..63a525edaa 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -332,6 +332,18 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
reference_name, version, skip_map, 0))
break;
+ if (current_value.s == NULL &&
+ (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
+ {
+ /* We could find no value for a strong reference. */
+ static const char msg[] = "undefined symbol: ";
+ const size_t len = strlen (undef_name);
+ char buf[sizeof msg + len];
+ memcpy (buf, msg, sizeof msg - 1);
+ memcpy (&buf[sizeof msg - 1], undef_name, len + 1);
+ _dl_signal_error (0, reference_name, buf);
+ }
+
*ref = current_value.s;
return current_value.a;
}
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 492d3ba452..c433a72679 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -35,7 +35,7 @@ bind_now=
while test $# -gt 0; do
case "$1" in
--v | --ve | --ver | --vers | --versi | --versio | --version)
- echo '"ldd (GNU libc) @VERSION@'
+ echo 'ldd (GNU libc) @VERSION@'
echo $"Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."