]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
elflint: Only check the PT_TLS phdr if it actually exists, warn otherwise.
authorMark Wielaard <mjw@redhat.com>
Thu, 18 Jun 2015 10:50:47 +0000 (12:50 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 19 Jun 2015 11:02:09 +0000 (13:02 +0200)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/elflint.c

index dbd1e44e9e6b9f42e7c54f84d46ca205720972a7..13e66e1c2921c4776a5073b0203688a83694122c 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-18  Mark Wielaard  <mjw@redhat.com>
+
+       * elflint.c (check_symtab): Only check the PT_TLS phdr if it actually
+       exists. Warn otherwise.
+
 2015-06-18  Mark Wielaard  <mjw@redhat.com>
 
        * nm.c (show_symbols): Check sizeof (sym_mem[0]), not GElf_Sym to
index 1c6a55a799dd9d29ec604f0a03bda069fd6207ac..a916886234cbb00197002712f9f8e84d04fe4910 100644 (file)
@@ -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