summary refs log tree commit diff
path: root/sysdeps/arm/dl-machine.h
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@codesourcery.com>2014-06-20 20:08:03 +0100
committerMaciej W. Rozycki <macro@codesourcery.com>2014-06-20 20:22:42 +0100
commit90e5dd482fc4708d559fbec9740104470ffdb9df (patch)
tree0e1cf5705463c270c44330e0b8b4660004dc55e6 /sysdeps/arm/dl-machine.h
parent809fdf0d23ddb683eb60672465d7a39d02ef272b (diff)
downloadglibc-90e5dd482fc4708d559fbec9740104470ffdb9df.tar.gz
glibc-90e5dd482fc4708d559fbec9740104470ffdb9df.tar.xz
glibc-90e5dd482fc4708d559fbec9740104470ffdb9df.zip
[BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC
This fixes the calculation of R_ARM_TLS_DESC relocations for lazy global
symbol references, i.e. created with `-z lazy' in effect with the static
linker, where immediate resolution is requested with LD_BIND_NOW.
Diffstat (limited to 'sysdeps/arm/dl-machine.h')
-rw-r--r--sysdeps/arm/dl-machine.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 899b2568f3..c5ffc9304c 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -452,7 +452,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	    else
 # endif
 	      {
-		value = sym->st_value + td->argument.value;
+		if (ELF32_R_SYM (reloc->r_info) == STN_UNDEF)
+		  value = td->argument.value;
+		else
+		  value = sym->st_value;
 
 # ifndef RTLD_BOOTSTRAP
 #  ifndef SHARED