[PATCH] elflint: Only check the PT_TLS phdr if it actually exists.
Mark Wielaard
mjw at redhat.com
Thu Jun 18 10:51:43 UTC 2015
Signed-off-by: Mark Wielaard <mjw at redhat.com>
---
src/ChangeLog | 5 +++++
src/elflint.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 1b4f1d6..06d67f9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2015-06-18 Mark Wielaard <mjw at redhat.com>
+ * elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
+ exists.
+
+2015-06-18 Mark Wielaard <mjw at redhat.com>
+
* nm.c (show_symbols): Check sizeof (GElf_SymX), not GElf_Sym to
known whether or not we stack allocated memory.
diff --git a/src/elflint.c b/src/elflint.c
index 1c6a55a..6b5a6a9 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -858,7 +858,7 @@ 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
+ else if (phdr != NULL)
{
if (st_value
< destshdr->sh_offset - phdr->p_offset)
--
1.8.3.1
More information about the elfutils-devel
mailing list