summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-21 14:24:54 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-21 14:24:54 +0000
commit0438ec7017676de27f908791f310037bf9143b82 (patch)
tree933f18aecf5d850a51e6f360feb8da35a6e56b72 /ldso
parent00e04cb76f79f8cb50c23d0bca378b2b0b3f9f26 (diff)
Guard debug_sym/debug_reloc, make sure elfinterp.c sees __SUPPORT_LD_DEBUG__
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/arm/elfinterp.c4
-rw-r--r--ldso/ldso/cris/elfinterp.c2
-rw-r--r--ldso/ldso/dl-debug.c5
-rw-r--r--ldso/ldso/frv/elfinterp.c7
-rw-r--r--ldso/ldso/i386/elfinterp.c2
-rw-r--r--ldso/ldso/m68k/elfinterp.c2
-rw-r--r--ldso/ldso/mips/elfinterp.c4
-rw-r--r--ldso/ldso/powerpc/elfinterp.c6
-rw-r--r--ldso/ldso/sh/elfinterp.c5
-rw-r--r--ldso/ldso/sh64/elfinterp.c5
-rw-r--r--ldso/ldso/x86_64/elfinterp.c2
11 files changed, 35 insertions, 9 deletions
diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c
index 8086250ac..635f19010 100644
--- a/ldso/ldso/arm/elfinterp.c
+++ b/ldso/ldso/arm/elfinterp.c
@@ -38,6 +38,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
@@ -128,8 +130,10 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
symtab_index = ELF32_R_SYM(rpnt->r_info);
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
+#endif
res = reloc_fnc (tpnt, scope, rpnt, symtab, strtab);
diff --git a/ldso/ldso/cris/elfinterp.c b/ldso/ldso/cris/elfinterp.c
index abf4167a5..e981ae2e3 100644
--- a/ldso/ldso/cris/elfinterp.c
+++ b/ldso/ldso/cris/elfinterp.c
@@ -122,8 +122,10 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
symtab_index = ELF32_R_SYM(rpnt->r_info);
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab, strtab, symtab_index);
debug_reloc(symtab, strtab, rpnt);
+#endif
/* Pass over to actual relocation function. */
res = reloc_fnc(tpnt, scope, rpnt, symtab, strtab);
diff --git a/ldso/ldso/dl-debug.c b/ldso/ldso/dl-debug.c
index 7ce8bfbce..bfaaf1903 100644
--- a/ldso/ldso/dl-debug.c
+++ b/ldso/ldso/dl-debug.c
@@ -98,9 +98,4 @@ static void debug_reloc(ElfW(Sym) *symtab, char *strtab, ELF_RELOC *rpnt)
_dl_dprintf(_dl_debug_file, "\n");
}
-#else
-
-#define debug_sym(symtab, strtab, symtab_index)
-#define debug_reloc(symtab, strtab, rpnt)
-
#endif /* __SUPPORT_LD_DEBUG__ */
diff --git a/ldso/ldso/frv/elfinterp.c b/ldso/ldso/frv/elfinterp.c
index cccf9b70c..b1e7f5ba0 100644
--- a/ldso/ldso/frv/elfinterp.c
+++ b/ldso/ldso/frv/elfinterp.c
@@ -24,7 +24,7 @@ License along with uClibc; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
USA. */
-#include <sys/cdefs.h> /* __attribute_used__ */
+#include <features.h>
/* Program to load an ELF binary on a linux system, and run it.
References to symbols in sharable libraries can be resolved by either
@@ -37,7 +37,7 @@ USA. */
a more than adequate job of explaining everything required to get this
working. */
-struct funcdesc_value volatile *__attribute__((__visibility__("hidden")))
+struct funcdesc_value volatile attribute_hidden *
_dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
int reloc_type;
@@ -136,8 +136,11 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
int res;
symtab_index = ELF32_R_SYM(rpnt->r_info);
+
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
+#endif
res = reloc_fnc (tpnt, scope, rpnt, symtab, strtab);
diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c
index 62e854d87..33fc374dc 100644
--- a/ldso/ldso/i386/elfinterp.c
+++ b/ldso/ldso/i386/elfinterp.c
@@ -123,8 +123,10 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
symtab_index = ELF32_R_SYM(rpnt->r_info);
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab, strtab, symtab_index);
debug_reloc(symtab, strtab, rpnt);
+#endif
res = reloc_fnc(tpnt, scope, rpnt, symtab, strtab);
diff --git a/ldso/ldso/m68k/elfinterp.c b/ldso/ldso/m68k/elfinterp.c
index c777faa5b..80fa1c9ec 100644
--- a/ldso/ldso/m68k/elfinterp.c
+++ b/ldso/ldso/m68k/elfinterp.c
@@ -40,6 +40,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned int
diff --git a/ldso/ldso/mips/elfinterp.c b/ldso/ldso/mips/elfinterp.c
index 18b5799d9..95e02166e 100644
--- a/ldso/ldso/mips/elfinterp.c
+++ b/ldso/ldso/mips/elfinterp.c
@@ -27,6 +27,8 @@
* SUCH DAMAGE.
*/
+#include "ldso.h"
+
extern int _dl_runtime_resolve(void);
#define OFFSET_GP_GOT 0x7ff0
@@ -119,9 +121,9 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt,
symtab_index = ELF32_R_SYM(rpnt->r_info);
symbol_addr = 0;
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
-#if defined (__SUPPORT_LD_DEBUG__)
if (reloc_addr)
old_val = *reloc_addr;
#endif
diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c
index 3dd12f0ee..8ed4655b4 100644
--- a/ldso/ldso/powerpc/elfinterp.c
+++ b/ldso/ldso/powerpc/elfinterp.c
@@ -29,6 +29,8 @@
* SUCH DAMAGE.
*/
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
void _dl_init_got(unsigned long *plt,struct elf_resolve *tpnt)
@@ -116,10 +118,10 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,this_reloc);
-#if defined (__SUPPORT_LD_DEBUG__)
if (unlikely(ELF32_R_TYPE(this_reloc->r_info) != R_PPC_JMP_SLOT)) {
_dl_dprintf(2, "%s: Incorrect relocation type in jump relocation\n", _dl_progname);
_dl_exit(1);
@@ -363,8 +365,10 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
symtab_index = ELF32_R_SYM(rpnt->r_info);
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
+#endif
res = reloc_fnc (tpnt, scope, rpnt, symtab, strtab);
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c
index 3027a27f8..b07499a43 100644
--- a/ldso/ldso/sh/elfinterp.c
+++ b/ldso/ldso/sh/elfinterp.c
@@ -39,6 +39,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
@@ -122,8 +124,11 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
int res;
symtab_index = ELF32_R_SYM(rpnt->r_info);
+
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
+#endif
res = reloc_fnc(tpnt, scope, rpnt, symtab, strtab);
diff --git a/ldso/ldso/sh64/elfinterp.c b/ldso/ldso/sh64/elfinterp.c
index c20314a85..3e22e49c6 100644
--- a/ldso/ldso/sh64/elfinterp.c
+++ b/ldso/ldso/sh64/elfinterp.c
@@ -41,6 +41,8 @@
a more than adequate job of explaining everything required to get this
working. */
+#include "ldso.h"
+
extern int _dl_linux_resolve(void);
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
@@ -132,8 +134,11 @@ static int _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
int res;
symtab_index = ELF32_R_SYM(rpnt->r_info);
+
+#ifdef __SUPPORT_LD_DEBUG__
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
+#endif
res = reloc_fnc (tpnt, scope, rpnt, symtab, strtab);
if (res == 0)
diff --git a/ldso/ldso/x86_64/elfinterp.c b/ldso/ldso/x86_64/elfinterp.c
index 66552d879..424e480e6 100644
--- a/ldso/ldso/x86_64/elfinterp.c
+++ b/ldso/ldso/x86_64/elfinterp.c
@@ -125,8 +125,10 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
symtab_index = ELF_R_SYM(rpnt->r_info);
+#if defined (__SUPPORT_LD_DEBUG__)
debug_sym(symtab, strtab, symtab_index);
debug_reloc(symtab, strtab, rpnt);
+#endif
res = reloc_fnc(tpnt, scope, rpnt, symtab, strtab);