aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c6
1 files changed, 4 insertions, 2 deletions
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;
}