This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 18/21] ARC: testsuite fix: GD TLS issue


From: Cupertino Miranda <cmiranda@synopsys.com>

Offset set by the linker in the GOT entries would be overwritten by the dynamic
loader instead of added to the symbol location.
Other target have the same approach on DTSOFF relocs.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 ChangeLog                | 4 ++++
 sysdeps/arc/dl-machine.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 39ff298b0091..ec068c7c5925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-17  Cupertino Miranda <cmiranda@synopsys.com>
+
+	* sysdeps/arc/dl-machine.h: Fix relocation.
+
 2018-12-17  Vineet Gupta <vgupta@synopsys.com>
 
 	* sysdeps/unix/make-syscalls.sh: Fix comment referencing
diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h
index 02727a3a4d47..f4757904084a 100644
--- a/sysdeps/arc/dl-machine.h
+++ b/sysdeps/arc/dl-machine.h
@@ -290,7 +290,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
         case R_ARC_TLS_DTPOFF:
           if (sym != NULL)
             {
-              *reloc_addr = sym->st_value;
+              *reloc_addr += sym->st_value;
             }
           break;
 
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]