summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-05-21 23:51:18 -0700
committerAndreas Schwab <schwab@redhat.com>2010-06-01 09:54:07 +0200
commita0ba5dee69157acbf5d4093544cdec24ec386164 (patch)
tree0af4ccf1981ca56fec43482b9ee04ee113199a35
parent6155a84f4a571a88a16375b7c78d5194bda3539d (diff)
Don't crash on unresolved weak symbol reference when auditing.
(cherry picked from commit b32b8b451b398ebae33d4cf8039c03f4d615c0c3)
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-runtime.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a93e2a2f4c..55f1145d19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-21 Ulrich Drepper <drepper@redhat.com>
+
+ * elf/dl-runtime.c (_dl_profile_fixup): Don't crash on unresolved weak
+ symbol reference.
+
2010-05-19 Andreas Schwab <schwab@redhat.com>
* elf/dl-runtime.c (_dl_fixup): Don't crash on unresolved weak
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 181af7dfac..6847edafc6 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -232,8 +232,9 @@ _dl_profile_fixup (
? LOOKUP_VALUE_ADDRESS (result)
+ defsym->st_value : 0);
- if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
- == STT_GNU_IFUNC, 0))
+ if (defsym != NULL
+ && __builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
+ == STT_GNU_IFUNC, 0))
value = ((DL_FIXUP_VALUE_TYPE (*) (void))
DL_FIXUP_VALUE_ADDR (value)) ();
}