summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-12-27 09:34:40 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2017-01-14 18:31:49 +0100
commit43a672393627a4b21ebca5e9bf64f93b6ada7c25 (patch)
tree3ad66b1ae0d5d3d19176f8fdc2ac15df4f6b911b
parentae0bcade2ae104331974563c92fe62cf6ed7c975 (diff)
ldso: do not resolve relocations for debug, dig them up when debugging
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-rw-r--r--ldso/ldso/arc/dl-debug.h83
-rw-r--r--ldso/ldso/arc/elfinterp.c5
-rw-r--r--ldso/ldso/arm/dl-debug.h46
-rw-r--r--ldso/ldso/arm/elfinterp.c5
-rw-r--r--ldso/ldso/avr32/dl-debug.h45
-rw-r--r--ldso/ldso/avr32/elfinterp.c5
-rw-r--r--ldso/ldso/bfin/dl-debug.h54
-rw-r--r--ldso/ldso/bfin/elfinterp.c4
-rw-r--r--ldso/ldso/c6x/dl-debug.h49
-rw-r--r--ldso/ldso/c6x/elfinterp.c4
-rw-r--r--ldso/ldso/cris/dl-debug.h42
-rw-r--r--ldso/ldso/cris/elfinterp.c6
-rw-r--r--ldso/ldso/dl-debug.c21
-rw-r--r--ldso/ldso/frv/dl-debug.h29
-rw-r--r--ldso/ldso/frv/elfinterp.c4
-rw-r--r--ldso/ldso/i386/dl-debug.h36
-rw-r--r--ldso/ldso/i386/elfinterp.c7
-rw-r--r--ldso/ldso/m68k/dl-debug.h42
-rw-r--r--ldso/ldso/m68k/elfinterp.c6
-rw-r--r--ldso/ldso/metag/dl-debug.h33
-rw-r--r--ldso/ldso/metag/elfinterp.c6
-rw-r--r--ldso/ldso/microblaze/dl-debug.h62
-rw-r--r--ldso/ldso/microblaze/elfinterp.c6
-rw-r--r--ldso/ldso/mips/dl-debug.h54
-rw-r--r--ldso/ldso/mips/elfinterp.c5
-rw-r--r--ldso/ldso/nds32/dl-debug.h25
-rw-r--r--ldso/ldso/nds32/elfinterp.c4
-rw-r--r--ldso/ldso/nios2/dl-debug.h18
-rw-r--r--ldso/ldso/nios2/elfinterp.c5
-rw-r--r--ldso/ldso/or1k/dl-debug.h53
-rw-r--r--ldso/ldso/or1k/elfinterp.c6
-rw-r--r--ldso/ldso/powerpc/dl-debug.h44
-rw-r--r--ldso/ldso/powerpc/elfinterp.c8
-rw-r--r--ldso/ldso/sh/dl-debug.h43
-rw-r--r--ldso/ldso/sh/elfinterp.c5
-rw-r--r--ldso/ldso/sparc/dl-debug.h40
-rw-r--r--ldso/ldso/sparc/elfinterp.c6
-rw-r--r--ldso/ldso/x86_64/dl-debug.h39
-rw-r--r--ldso/ldso/x86_64/elfinterp.c6
-rw-r--r--ldso/ldso/xtensa/dl-debug.h38
-rw-r--r--ldso/ldso/xtensa/elfinterp.c6
41 files changed, 2 insertions, 1003 deletions
diff --git a/ldso/ldso/arc/dl-debug.h b/ldso/ldso/arc/dl-debug.h
deleted file mode 100644
index 6573e5452..000000000
--- a/ldso/ldso/arc/dl-debug.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-static const char *_dl_reltypes_tab[] =
-{
- "R_ARC_NONE", /* 0 */
- "R_ARC_8",
- "R_ARC_16",
- "R_ARC_24",
- "R_ARC_32",
- "R_ARC_B26", /* 5 */
- "R_ARC_B22_PCREL",
- "R_ARC_H30",
- "R_ARC_N8",
- "R_ARC_N16",
- "R_ARC_N24", /* 10 */
- "R_ARC_N32",
- "R_ARC_SDA",
- "R_ARC_SECTOFF",
- "R_ARC_S21H_PCREL",
- "R_ARC_S21W_PCREL", /* 15 */
- "R_ARC_S25H_PCREL",
- "R_ARC_S25W_PCREL",
- "R_ARC_SDA32",
- "R_ARC_SDA_LDST",
- "R_ARC_SDA_LDST1", /* 20 */
- "R_ARC_SDA_LDST2",
- "R_ARC_SDA16_LD",
- "R_ARC_SDA16_LD1",
- "R_ARC_SDA16_LD2",
- "R_ARC_S13_PCREL", /* 25 */
- "R_ARC_W",
- "R_ARC_32_ME",
- "R_ARC_N32_ME",
- "R_ARC_SECTOFF_ME",
- "R_ARC_SDA32_ME", /* 30 */
- "R_ARC_W_ME",
- "R_ARC_H30_ME",
- "R_ARC_SECTOFF_U8",
- "R_ARC_SECTOFF_S9",
- "R_AC_SECTOFF_U8", /* 35 */
- "R_AC_SECTOFF_U8_1",
- "R_AC_SECTOFF_U8_2",
- "R_AC_SECTOFF_S9",
- "R_AC_SECTOFF_S9_1",
- "R_AC_SECTOFF_S9_2", /* 40 */
- "R_ARC_SECTOFF_ME_1",
- "R_ARC_SECTOFF_ME_2",
- "R_ARC_SECTOFF_1",
- "R_ARC_SECTOFF_2",
- "", /* 45 */
- "",
- "",
- "",
- "",
- "R_ARC_PC32", /* 50 */
- "R_ARC_GOTPC32",
- "R_ARC_PLT32",
- "R_ARC_COPY",
- "R_ARC_GLOB_DAT",
- "R_ARC_JMP_SLOT", /* 55 */
- "R_ARC_RELATIVE",
- "R_ARC_GOTOFF",
- "R_ARC_GOTPC",
- "R_ARC_GOT32",
- "", /* 60 */
- "",
- "",
- "",
- "",
- "", /* 65 */
- "R_ARC_TLS_DTPMOD",
- "R_ARC_TLS_DTPOFF",
- "R_ARC_TLS_TPOFF",
- "R_ARC_TLS_GD_GOT",
- "R_ARC_TLS_GD_LD", /* 70 */
- "R_ARC_TLS_GD_CALL",
- "R_ARC_TLS_IE_GOT",
- "",
- "",
-};
diff --git a/ldso/ldso/arc/elfinterp.c b/ldso/ldso/arc/elfinterp.c
index 2f0cf7f66..1b5b65115 100644
--- a/ldso/ldso/arc/elfinterp.c
+++ b/ldso/ldso/arc/elfinterp.c
@@ -262,13 +262,8 @@ static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (unlikely(res != 0)) {
if (res < 0) {
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-#if defined __SUPPORT_LD_DEBUG__
- _dl_dprintf(2, "can't handle reloc type %s\n ",
- _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n",
reloc_type);
-#endif
_dl_exit(-res);
} else {
_dl_dprintf(2, "can't resolve symbol\n");
diff --git a/ldso/ldso/arm/dl-debug.h b/ldso/ldso/arm/dl-debug.h
deleted file mode 100644
index af14eca2d..000000000
--- a/ldso/ldso/arm/dl-debug.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* ARM ELF shared library loader suppport
- *
- * Copyright (C) 2001-2004 Erik Andersen
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the above contributors may not be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-static const char * const _dl_reltypes_tab[] =
-{
- [0] "R_ARM_NONE", "R_ARM_PC24", "R_ARM_ABS32", "R_ARM_REL32",
- [4] "R_ARM_PC13", "R_ARM_ABS16", "R_ARM_ABS12", "R_ARM_THM_ABS5",
- [8] "R_ARM_ABS8", "R_ARM_SBREL32","R_ARM_THM_PC22", "R_ARM_THM_PC8",
- [12] "R_ARM_AMP_VCALL9", "R_ARM_SWI24", "R_ARM_THM_SWI8", "R_ARM_XPC25",
- [16] "R_ARM_THM_XPC22", "R_ARM_TLS_DTPMOD32", "R_ARM_TLS_DTPOFF32", "R_ARM_TLS_TPOFF32",
- [20] "R_ARM_COPY", "R_ARM_GLOB_DAT","R_ARM_JUMP_SLOT", "R_ARM_RELATIVE",
- [24] "R_ARM_GOTOFF", "R_ARM_GOTPC", "R_ARM_GOT32", "R_ARM_PLT32",
- [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",
- [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",
- [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/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c
index 2043263ec..11866a4f8 100644
--- a/ldso/ldso/arm/elfinterp.c
+++ b/ldso/ldso/arm/elfinterp.c
@@ -1,4 +1,3 @@
-/* vi: set sw=4 ts=4: */
/* ARM ELF shared library loader suppport
*
* Copyright (C) 2001-2004 Erik Andersen
@@ -138,11 +137,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (unlikely(res <0))
{
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-#if defined (__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type %s\n ", _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n", reloc_type);
-#endif
_dl_exit(-res);
}
if (unlikely(res >0))
diff --git a/ldso/ldso/avr32/dl-debug.h b/ldso/ldso/avr32/dl-debug.h
deleted file mode 100644
index 44b0c01da..000000000
--- a/ldso/ldso/avr32/dl-debug.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * AVR32 ELF shared libary loader support
- *
- * Copyright (C) 2005-2007 Atmel Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the above contributors may not be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-static const char * const _dl_reltypes_tab[] = {
- "R_AVR32_NONE",
- "R_AVR32_32", "R_AVR32_16", "R_AVR32_8",
- "R_AVR32_32_PCREL", "R_AVR32_16_PCREL", "R_AVR32_8_PCREL",
- "R_AVR32_DIFF32", "R_AVR32_DIFF16", "R_AVR32_DIFF8",
- "R_AVR32_GOT32", "R_AVR32_GOT16", "R_AVR32_GOT8",
- "R_AVR32_21S", "R_AVR32_16U", "R_AVR32_16S", "R_AVR32_8S", "R_AVR32_8S_EXT",
- "R_AVR32_22H_PCREL", "R_AVR32_18W_PCREL", "R_AVR32_16B_PCREL",
- "R_AVR32_16N_PCREL", "R_AVR32_14UW_PCREL", "R_AVR32_11H_PCREL",
- "R_AVR32_10UW_PCREL", "R_AVR32_9H_PCREL", "R_AVR32_9UW_PCREL",
- "R_AVR32_HI16", "R_AVR32_LO16",
- "R_AVR32_GOTPC", "R_AVR32_GOTCALL", "R_AVR32_LDA_GOT",
- "R_AVR32_GOT21S", "R_AVR32_GOT18SW", "R_AVR32_GOT16S", "R_AVR32_GOT7UW",
- "R_AVR32_32_CPENT", "R_AVR32_CPCALL", "R_AVR32_16_CP", "R_AVR32_9W_CP",
- "R_AVR32_RELATIVE", "R_AVR32_GLOB_DAT", "R_AVR32_JMP_SLOT",
- "R_AVR32_ALIGN",
-};
diff --git a/ldso/ldso/avr32/elfinterp.c b/ldso/ldso/avr32/elfinterp.c
index 17f34fae8..9bae4d964 100644
--- a/ldso/ldso/avr32/elfinterp.c
+++ b/ldso/ldso/avr32/elfinterp.c
@@ -99,13 +99,8 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (res < 0) {
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-#if defined(__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type %s\n",
- _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n",
reloc_type);
-#endif
_dl_exit(-res);
} else {
_dl_dprintf(2, "can't resolve symbol\n");
diff --git a/ldso/ldso/bfin/dl-debug.h b/ldso/ldso/bfin/dl-debug.h
deleted file mode 100644
index 6952b6160..000000000
--- a/ldso/ldso/bfin/dl-debug.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* Blackfin ELF shared library loader suppport
- *
- * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
- * David Engel, Hongjiu Lu and Mitch D'Souza
- * Copyright (C) 2001-2004 Erik Andersen
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the above contributors may not be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-static const char * const _dl_reltypes_tab[] =
-{
- [0] "R_BFIN_UNUSED0", "R_BFIN_PCREL5M2",
- [2] "R_BFIN_UNUSED1", "R_BFIN_PCREL10",
- [4] "R_BFIN_PCREL12_JUMP", "R_BFIN_RIMM16",
- [6] "R_BFIN_LUIMM16", "R_BFIN_HUIMM16",
- [8] "R_BFIN_PCREL12_JUMP_S","R_BFIN_PCREL24_JUMP_X",
- [10] "R_BFIN_PCREL24", "R_BFIN_UNUSEDB",
- [12] "R_BFIN_UNUSEDC", "R_BFIN_PCREL24_JUMP_L",
- [14] "R_BFIN_PCREL24_CALL_X","R_BFIN_var_eq_symb",
- [16] "R_BFIN_BYTE_DATA", "R_BFIN_BYTE2_DATA", "R_BFIN_BYTE4_DATA",
- [19] "R_BFIN_PCREL11",
-
- [20] "R_BFIN_GOT17M4", "R_BFIN_GOTHI", "R_BFIN_GOTLO",
- [23] "R_BFIN_FUNCDESC",
- [24] "R_BFIN_FUNCDESC_GOT17M4", "R_BFIN_FUNCDESC_GOTHI", "R_BFIN_FUNCDESC_GOTLO",
- [27] "R_BFIN_FUNCDESC_VALUE", "R_BFIN_FUNCDESC_GOTOFF17M4",
- [29] "R_BFIN_FUNCDESC_GOTOFFHI", "R_BFIN_FUNCDESC_GOTOFFLO",
- [31] "R_BFIN_GOTOFF17M4", "R_BFIN_GOTOFFHI", "R_BFIN_GOTOFFLO",
-#if 0
- [200] "R_BFIN_GNU_VTINHERIT", "R_BFIN_GNU_VTENTRY"
-#endif
-};
diff --git a/ldso/ldso/bfin/elfinterp.c b/ldso/ldso/bfin/elfinterp.c
index 4e1c1c75f..d4cb0f183 100644
--- a/ldso/ldso/bfin/elfinterp.c
+++ b/ldso/ldso/bfin/elfinterp.c
@@ -136,11 +136,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (res <0) {
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-#if defined (__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type %s\n ", _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n", reloc_type);
-#endif
_dl_exit(-res);
} else if (res >0) {
_dl_dprintf(2, "can't resolve symbol\n");
diff --git a/ldso/ldso/c6x/dl-debug.h b/ldso/ldso/c6x/dl-debug.h
deleted file mode 100644
index d4915bf21..000000000
--- a/ldso/ldso/c6x/dl-debug.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* C6X DSBT ELF shared library loader suppport.
- *
- * Copyright (C) 2010 Texas Instruments Incorporated
- * Contributed by Mark Salter <msalter@redhat.com>
- *
- * All rights reserved.
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-static const char * const _dl_reltypes_tab[] =
-{
- "R_C6000_NONE", /* 0 */
- "R_C6000_ABS32",
- "R_C6000_ABS16",
- "R_C6000_ABS8",
- "R_C6000_PCR_S21",
- "R_C6000_PCR_S12", /* 5 */
- "R_C6000_PCR_S10",
- "R_C6000_PCR_S7",
- "R_C6000_ABS_S16",
- "R_C6000_ABS_L16",
- "R_C6000_ABS_H16", /* 10 */
- "R_C6000_SBR_U15_B",
- "R_C6000_SBR_U15_H",
- "R_C6000_SBR_U15_W",
- "R_C6000_SBR_S16",
- "R_C6000_SBR_L16_B", /* 15 */
- "R_C6000_SBR_L16_H",
- "R_C6000_SBR_L16_W",
- "R_C6000_SBR_H16_B",
- "R_C6000_SBR_H16_H",
- "R_C6000_SBR_H16_W", /* 20 */
- "R_C6000_SBR_GOT_U15_W",
- "R_C6000_SBR_GOT_L16_W",
- "R_C6000_SBR_GOT_H16_W",
- "R_C6000_DSBT_INDEX",
- "R_C6000_PREL31", /* 25 */
- "R_C6000_COPY",
- "R_C6000_JUMP_SLOT",
- "R_C6000_SBR_GOT32",
- "R_C6000_PCR_H16",
- "R_C6000_PCR_L16", /* 30 */
-#if 0
- "R_C6000_ALIGN", /* 253 */
- "R_C6000_FPHEAD", /* 254 */
- "R_C6000_NOCMP", /* 255 */
-#endif
-};
diff --git a/ldso/ldso/c6x/elfinterp.c b/ldso/ldso/c6x/elfinterp.c
index f0e05b9d0..5e265edf4 100644
--- a/ldso/ldso/c6x/elfinterp.c
+++ b/ldso/ldso/c6x/elfinterp.c
@@ -130,11 +130,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (res <0) {
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-#if defined (__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type %s\n ", _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n", reloc_type);
-#endif
_dl_exit(-res);
} else if (res >0) {
_dl_dprintf(2, "can't resolve symbol\n");
diff --git a/ldso/ldso/cris/dl-debug.h b/ldso/ldso/cris/dl-debug.h
deleted file mode 100644
index dcd23edb5..000000000
--- a/ldso/ldso/cris/dl-debug.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * CRIS ELF shared library loader support.
- *
- * Program to load an elf binary on a linux system, and run it.
- * References to symbols in sharable libraries can be resolved
- * by either an ELF sharable library or a linux style of shared
- * library.
- *
- * Copyright (C) 2002-2004, Axis Communications AB
- * All rights reserved
- *
- * Author: Tobias Anderberg, <tobiasa@axis.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the above contributors may not be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-static const char * const _dl_reltypes_tab[] = {
- [0] "R_CRIS_NONE", "R_CRIS_8", "R_CRIS_16", "R_CRIS_32",
- [4] "R_CRIS_8_PCREL", "R_CRIS_16_PCREL", "R_CRIS_32_PCREL", "R_CRIS_GNU_VTINHERIT",
- [8] "R_CRIS_GNU_VTENTRY", "R_CRIS_COPY", "R_CRIS_GLOB_DAT", "R_CRIS_JUMP_SLOT",
- [16] "R_CRIS_RELATIVE", "R_CRIS_16_GOT", "R_CRIS_32_GOT", "R_CRIS_16_GOTPLT",
- [32] "R_CRIS_32_GOTPLT", "R_CRIS_32_GOTREL", "R_CRIS_32_PLT_GOTREL", "R_CRIS_32_PLT_PCREL",
-};
diff --git a/ldso/ldso/cris/elfinterp.c b/ldso/ldso/cris/elfinterp.c
index 5ad302559..5ab2e4f9a 100644
--- a/ldso/ldso/cris/elfinterp.c
+++ b/ldso/ldso/cris/elfinterp.c
@@ -131,14 +131,8 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (unlikely(res < 0)) {
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-
-#if defined (__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type %s\n",
- _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n",
reloc_type);
-#endif
_dl_exit(-res);
} else if (unlikely(res > 0)) {
_dl_dprintf(2, "can't resolve symbol\n");
diff --git a/ldso/ldso/dl-debug.c b/ldso/ldso/dl-debug.c
index 88a48933c..4767e0723 100644
--- a/ldso/ldso/dl-debug.c
+++ b/ldso/ldso/dl-debug.c
@@ -1,4 +1,3 @@
-/* vi: set sw=4 ts=4: */
/* common debug code for ELF shared library loader
*
* Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
@@ -41,22 +40,6 @@
#if defined (__SUPPORT_LD_DEBUG__)
-/* include the arch-specific _dl_reltypes_tab */
-#include "dl-debug.h"
-
-static const char *_dl_reltypes(int type)
-{
- static char buf[50];
- const char *str;
- int tabsize;
-
- tabsize = (int)(sizeof(_dl_reltypes_tab) / sizeof(_dl_reltypes_tab[0]));
-
- if (type >= tabsize || (str = _dl_reltypes_tab[type]) == NULL)
- str = _dl_simple_ltoa(buf, (unsigned long)type);
-
- return str;
-}
static void debug_sym(ElfW(Sym) *symtab, char *strtab, int symtab_index)
{
if (!_dl_debug_symbols || !symtab_index)
@@ -89,8 +72,8 @@ static void debug_reloc(ElfW(Sym) *symtab, char *strtab, ELF_RELOC *rpnt)
_dl_dprintf(_dl_debug_file, "\n%s\n\t", sym);
}
- _dl_dprintf(_dl_debug_file, "%s\toffset=%x",
- _dl_reltypes(ELF_R_TYPE(rpnt->r_info)),
+ _dl_dprintf(_dl_debug_file, "%x\toffset=%x",
+ ELF_R_TYPE(rpnt->r_info),
rpnt->r_offset);
#ifdef ELF_USES_RELOCA
_dl_dprintf(_dl_debug_file, "\taddend=%x", rpnt->r_addend);
diff --git a/ldso/ldso/frv/dl-debug.h b/ldso/ldso/frv/dl-debug.h
deleted file mode 100644
index 65c2386fb..000000000
--- a/ldso/ldso/frv/dl-debug.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* FR-V FDPIC ELF shared library loader suppport
- * Copyright (C) 2003, 2004 Red Hat, Inc.
- * Contributed by Alexandre Oliva <aoliva@redhat.com>
- * Lots of code copied from ../i386/elfinterp.c, so:
- * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
- * David Engel, Hongjiu Lu and Mitch D'Souza
- * Copyright (C) 2001-2002, Erik Andersen
- * All rights reserved.
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-static const char * const _dl_reltypes_tab[] =
-{
- [0] "R_FRV_NONE", "R_FRV_32",
- [2] "R_FRV_LABEL16", "R_FRV_LABEL24",
- [4] "R_FRV_LO16", "R_FRV_HI16",
- [6] "R_FRV_GPREL12", "R_FRV_GPRELU12",
- [8] "R_FRV_GPREL32", "R_FRV_GPRELHI", "R_FRV_GPRELLO",
- [11] "R_FRV_GOT12", "R_FRV_GOTHI", "R_FRV_GOTLO",
- [14] "R_FRV_FUNCDESC",
- [15] "R_FRV_FUNCDESC_GOT12", "R_FRV_FUNCDESC_GOTHI", "R_FRV_FUNCDESC_GOTLO",
- [18] "R_FRV_FUNCDESC_VALUE", "R_FRV_FUNCDESC_GOTOFF12",
- [20] "R_FRV_FUNCDESC_GOTOFFHI", "R_FRV_FUNCDESC_GOTOFFLO",
- [22] "R_FRV_GOTOFF12", "R_FRV_GOTOFFHI", "R_FRV_GOTOFFLO",
-#if 0
- [200] "R_FRV_GNU_VTINHERIT", "R_FRV_GNU_VTENTRY"
-#endif
-};
diff --git a/ldso/ldso/frv/elfinterp.c b/ldso/ldso/frv/elfinterp.c
index 2c954b3ab..96e22a94b 100644
--- a/ldso/ldso/frv/elfinterp.c
+++ b/ldso/ldso/frv/elfinterp.c
@@ -125,11 +125,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (res <0)
{
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-#if defined (__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type %s\n ", _dl_reltypes(reloc_type));
-#else
_dl_dprintf(2, "can't handle reloc type %x\n", reloc_type);
-#endif
_dl_exit(-res);
}
else if (res >0)
diff --git a/ldso/ldso/i386/dl-debug.h b/ldso/ldso/i386/dl-debug.h
deleted file mode 100644
index 82baf1fcc..000000000
--- a/ldso/ldso/i386/dl-debug.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* i386 ELF shared library loader suppport
- *
- * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
- * David Engel, Hongjiu Lu and Mitch D'Souza
- * Copyright (C) 2001-2004 Erik Andersen
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the above contributors may not be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-static const char * const _dl_reltypes_tab[] = {
- [0] "R_386_NONE", "R_386_32", "R_386_PC32", "R_386_GOT32",
- [4] "R_386_PLT32", "R_386_COPY", "R_386_GLOB_DAT", "R_386_JMP_SLOT",
- [8] "R_386_RELATIVE", "R_386_GOTOFF", "R_386_GOTPC",
-};
diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c
index aadb00add..b2fb18247 100644
--- a/ldso/ldso/i386/elfinterp.c
+++ b/ldso/ldso/i386/elfinterp.c
@@ -1,4 +1,3 @@
-/* vi: set sw=4 ts=4: */
/* i386 ELF shared library loader suppport
*
* Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
@@ -137,14 +136,8 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (unlikely(res < 0)) {
int reloc_type = ELF_R_TYPE(rpnt->r_info);
-
-#if defined (__SUPPORT_LD_DEBUG__)
- _dl_dprintf(2, "can't handle reloc type '%s' in lib '%s'\n",
- _dl_reltypes(reloc_type), tpnt->libname);
-#else
_dl_dprintf(2, "can't handle reloc type %x in lib '%s'\n",
reloc_type, tpnt->libname);
-#endif
return res;
} else if (unlikely(res > 0)) {
_dl_dprintf(2, "can't resolve symbol in lib '%s'.\n", tpnt->libname);
diff --git a/ldso/ldso/m68k/dl-debug.h b/ldso/ldso/m68k/dl-debug.h
deleted file mode 100644
index 71b513a3e..000000000
--- a/ldso/ldso/m68k/dl-debug.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/* m68k ELF shared library loader suppport
- *
- * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
- * David Engel, Hongjiu Lu and Mitch D'Souza
- * Adapted to ELF/68k by Andreas Schwab.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the above contributors may not be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-static const char * const _dl_reltypes_tab[] = {
- [0] "R_68K_NONE",
- [1] "R_68K_32", "R_68K_16", "R_68K_8",
- [4] "R_68K_PC32", "R_68K_PC16", "R_68K_PC8",
- [7] "R_68K_GOT32", "R_68K_GOT16", "R_68K_GOT8",
- [10] "R_68K_GOT32O", "R_68K_GOT16O", "R_68K_GOT8O",
- [13] "R_68K_PLT32", "R_68K_PLT16", "R_68K_PLT8",
- [16] "R_68K_PLT32O", "R_68K_PLT16O", "R_68K_PLT8O",
- [19] "R_68K_COPY", "R_68K_GLOB_DAT", "R_68K_JMP_SLOT", "R_68K_RELATIVE",
- [23] "R_68K_NUM"
-};
diff --git a/ldso/ldso/m68k/elfinterp.c b/ldso/ldso/m68k/elfinterp.c
index fd7fe8513..899fa950d 100644
--- a/ldso/ldso/m68k/elfinterp.c
+++ b/