[git commit ldso-future] dl-debug.h: guard TLS relocations

Peter S. Mazinger ps.m at gmx.net
Mon Apr 11 11:27:03 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=ad688a0be9360850b5c1552fb135a4d335e2655c
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/ldso-future

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 ldso/ldso/arm/dl-debug.h    |    4 ++++
 ldso/ldso/sh/dl-debug.h     |    4 ++++
 ldso/ldso/x86_64/dl-debug.h |    4 ++++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ldso/ldso/arm/dl-debug.h b/ldso/ldso/arm/dl-debug.h
index 1bca6ff..48aa6fc 100644
--- a/ldso/ldso/arm/dl-debug.h
+++ b/ldso/ldso/arm/dl-debug.h
@@ -27,6 +27,8 @@
  * SUCH DAMAGE.
  */
 
+#include <features.h>
+
 static const char *_dl_reltypes_tab[] =
 {
   [0]	"R_ARM_NONE",	    "R_ARM_PC24",	"R_ARM_ABS32",		"R_ARM_REL32",
@@ -39,8 +41,10 @@ static const char *_dl_reltypes_tab[] =
   [32]	"R_ARM_ALU_PCREL_7_0","R_ARM_ALU_PCREL_15_8","R_ARM_ALU_PCREL_23_15","R_ARM_LDR_SBREL_11_0",
   [36]	"R_ARM_ALU_SBREL_19_12","R_ARM_ALU_SBREL_27_20",
   [100]	"R_ARM_GNU_VTENTRY","R_ARM_GNU_VTINHERIT","R_ARM_THM_PC11","R_ARM_THM_PC9",
+#ifdef __UCLIBC_HAS_TLS__
   [104] "R_ARM_TLS_GD32","R_ARM_TLS_LDM32","R_ARM_TLS_LDO32","R_ARM_TLS_IE32",
   [108] "R_ARM_TLS_LE32","R_ARM_TLS_LDO12","R_ARM_TLS_LE12","R_ARM_TLS_IE12GP",
+#endif
   [249] "R_ARM_RXPC25", "R_ARM_RSBREL32", "R_ARM_THM_RPC22", "R_ARM_RREL32",
   [253] "R_ARM_RABS22", "R_ARM_RPC24", "R_ARM_RBASE",
 };
diff --git a/ldso/ldso/sh/dl-debug.h b/ldso/ldso/sh/dl-debug.h
index e2e74f8..f6e2191 100644
--- a/ldso/ldso/sh/dl-debug.h
+++ b/ldso/ldso/sh/dl-debug.h
@@ -28,6 +28,8 @@
  * SUCH DAMAGE.
  */
 
+#include <features.h>
+
 static const char *_dl_reltypes_tab[] =
 {
   [0]	"R_SH_NONE",	"R_SH_DIR32",	"R_SH_REL32",	"R_SH_DIR8WPN",
@@ -36,8 +38,10 @@ static const char *_dl_reltypes_tab[] =
  [25]	"R_SH_SWITCH16","R_SH_SWITCH32","R_SH_USES",
  [28]	"R_SH_COUNT",	"R_SH_ALIGN",	"R_SH_CODE",	"R_SH_DATA",
  [32]	"R_SH_LABEL",	"R_SH_SWITCH8",	"R_SH_GNU_VTINHERIT","R_SH_GNU_VTENTRY",
+#ifdef __UCLIBC_HAS_TLS__
 [144]	"R_SH_TLS_GD_32","R_SH_TLS_LD_32", "R_SH_TLS_LDO_32", "R_SH_TLS_IE_32", 
 [148]	"R_SH_TLS_LE_32","R_SH_TLS_DTPMOD32", "R_SH_TLS_DTPOFF32", "R_SH_TLS_TPOFF32",
+#endif
 [160]	"R_SH_GOT32",	"R_SH_PLT32",	"R_SH_COPY",	"R_SH_GLOB_DAT",
 [164]	"R_SH_JMP_SLOT","R_SH_RELATIVE","R_SH_GOTOFF",	"R_SH_GOTPC",
 };
diff --git a/ldso/ldso/x86_64/dl-debug.h b/ldso/ldso/x86_64/dl-debug.h
index d605a03..2cadc47 100644
--- a/ldso/ldso/x86_64/dl-debug.h
+++ b/ldso/ldso/x86_64/dl-debug.h
@@ -29,11 +29,15 @@
  * SUCH DAMAGE.
  */
 
+#include <features.h>
+
 static const char *_dl_reltypes_tab[] = {
 	[ 0] "R_X86_64_NONE",     "R_X86_64_64",       "R_X86_64_PC32",     "R_X86_64_GOT32",
 	[ 4] "R_X86_64_PLT32",    "R_X86_64_COPY",     "R_X86_64_GLOB_DAT", "R_X86_64_JUMP_SLOT",
 	[ 8] "R_X86_64_RELATIVE", "R_X86_64_GOTPCREL", "R_X86_64_32",       "R_X86_64_32S",
 	[12] "R_X86_64_16",       "R_X86_64_PC16",     "R_X86_64_8",        "R_X86_64_PC8",
+#ifdef __UCLIBC_HAS_TLS__
 	[16] "R_X86_64_DTPMOD64", "R_X86_64_DTPOFF64", "R_X86_64_TPOFF64",  "R_X86_64_TLSGD",
 	[20] "R_X86_64_TLSLD",    "R_X86_64_DTPOFF32", "R_X86_64_GOTTPOFF", "R_X86_64_TPOFF32"
+#endif
 };
-- 
1.7.3.4



More information about the uClibc-cvs mailing list