* elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
authorUlrich Weigand <uweigand@de.ibm.com>
Thu, 21 Aug 2008 22:28:00 +0000 (22:28 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Thu, 21 Aug 2008 22:28:00 +0000 (22:28 +0000)
gdb/ChangeLog
gdb/elfread.c

index b795305b93f1a8cbfb892b01541d1e18e6ecdb9e..4d60a94e107813f4cfd3f76d616b6ceae43ffe01 100644 (file)
@@ -1,3 +1,7 @@
+2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
+
 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * xcoffread.c (SYMNAME_ALLOC): Correct syntax.
index 0b082472bb8711d489db33121b1adaf9d2e64db4..17f86baf903c56b5a6cc08a7d278eec50a6c7cc9 100644 (file)
@@ -324,8 +324,10 @@ elf_symtab_read (struct objfile *objfile, int type,
             interested in will have a section. */
          /* Bfd symbols are section relative. */
          symaddr = sym->value + sym->section->vma;
-         /* Relocate all non-absolute symbols by the section offset.  */
-         if (sym->section != &bfd_abs_section)
+         /* Relocate all non-absolute and non-TLS symbols by the
+            section offset.  */
+         if (sym->section != &bfd_abs_section
+             && !(sym->section->flags & SEC_THREAD_LOCAL))
            {
              symaddr += offset;
            }