summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2015-06-18 12:50:47 +0200
committerMark Wielaard <[email protected]>2015-06-19 13:02:09 +0200
commit77be59bca4057b22af70b0b2d0197f9505577381 (patch)
treee39c5a1593e33bd7caf3b3a590936447b51a355a
parent85cc9c6c72cb90ae06831b2b6618a2584dd0a827 (diff)
elflint: Only check the PT_TLS phdr if it actually exists, warn otherwise.
Signed-off-by: Mark Wielaard <[email protected]>
-rw-r--r--src/ChangeLog5
-rw-r--r--src/elflint.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dbd1e44e..13e66e1c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2015-06-18 Mark Wielaard <[email protected]>
+ * elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
+ exists. Warn otherwise.
+
+2015-06-18 Mark Wielaard <[email protected]>
+
* nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to
known whether or not we stack allocated memory.
diff --git a/src/elflint.c b/src/elflint.c
index 1c6a55a7..a9168862 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -858,6 +858,12 @@ section [%2d] '%s': symbol %zu does not fit completely in referenced section [%2
section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n"),
idx, section_name (ebl, idx), cnt);
}
+ else if (phdr == NULL)
+ {
+ ERROR (gettext ("\
+section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program header entry\n"),
+ idx, section_name (ebl, idx), cnt);
+ }
else
{
if (st_value