From 45148c2ed5b35a239b8b479185e2326245934c91 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 21 Aug 2008 22:28:00 +0000 Subject: * elfread.c (elf_symtab_read): Do not relocate thread-local symbols. --- gdb/elfread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/elfread.c') diff --git a/gdb/elfread.c b/gdb/elfread.c index 0b082472bb8..17f86baf903 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; } -- cgit v1.2.1