From 90e5dd482fc4708d559fbec9740104470ffdb9df Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 20 Jun 2014 20:08:03 +0100 Subject: [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. --- sysdeps/arm/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sysdeps/arm/Makefile') diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile index daaf4aa922..a1380487b1 100644 --- a/sysdeps/arm/Makefile +++ b/sysdeps/arm/Makefile @@ -11,6 +11,26 @@ $(objpfx)libgcc-stubs.a: $(objpfx)aeabi_unwind_cpp_pr1.os $(build-extra-lib) lib-noranlib: $(objpfx)libgcc-stubs.a + +ifeq ($(build-shared),yes) +ifeq ($(have-arm-tls-desc),yes) +tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy +modules-names += tst-armtlsdesclocmod +modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod +CPPFLAGS-tst-armtlsdescextnowmod.c += -Dstatic= +CPPFLAGS-tst-armtlsdescextlazymod.c += -Dstatic= +CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=gnu2 +CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=gnu2 +CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=gnu2 +LDFLAGS-tst-armtlsdescextnowmod.so += -Wl,-z,now +tst-armtlsdescloc-ENV = LD_BIND_NOW=1 +tst-armtlsdescextnow-ENV = LD_BIND_NOW=1 +tst-armtlsdescextlazy-ENV = LD_BIND_NOW=1 +$(objpfx)tst-armtlsdescloc: $(objpfx)tst-armtlsdesclocmod.so +$(objpfx)tst-armtlsdescextnow: $(objpfx)tst-armtlsdescextnowmod.so +$(objpfx)tst-armtlsdescextlazy: $(objpfx)tst-armtlsdescextlazymod.so +endif +endif endif ifeq ($(subdir),csu) -- cgit 1.4.1