aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-08-21 22:28:00 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-08-21 22:28:00 +0000
commit45148c2ed5b35a239b8b479185e2326245934c91 (patch)
tree36ccfe296b9778f2d5a99c81d0beadbcc4b093ba /gdb
parent6a94242bfd60f6252412627b3998cec258e77ea6 (diff)
downloadgdb-45148c2ed5b35a239b8b479185e2326245934c91.zip
gdb-45148c2ed5b35a239b8b479185e2326245934c91.tar.gz
gdb-45148c2ed5b35a239b8b479185e2326245934c91.tar.bz2
* elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/elfread.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b795305..4d60a94 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 0b08247..17f86ba 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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;
}