summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/arm/dl-startup.h2
-rw-r--r--ldso/ldso/arm/elfinterp.c28
-rw-r--r--ldso/ldso/avr32/dl-startup.h4
-rw-r--r--ldso/ldso/avr32/elfinterp.c28
-rw-r--r--ldso/ldso/bfin/dl-startup.h2
-rw-r--r--ldso/ldso/bfin/elfinterp.c2
-rw-r--r--ldso/ldso/c6x/dl-startup.h2
-rw-r--r--ldso/ldso/c6x/elfinterp.c22
-rw-r--r--ldso/ldso/cris/dl-startup.h2
-rw-r--r--ldso/ldso/cris/elfinterp.c30
-rw-r--r--ldso/ldso/frv/dl-startup.h2
-rw-r--r--ldso/ldso/frv/elfinterp.c32
-rw-r--r--ldso/ldso/i386/dl-startup.h2
-rw-r--r--ldso/ldso/i386/elfinterp.c28
-rw-r--r--ldso/ldso/m68k/dl-startup.h2
-rw-r--r--ldso/ldso/microblaze/dl-startup.h2
-rw-r--r--ldso/ldso/mips/elfinterp.c10
-rw-r--r--ldso/ldso/powerpc/dl-startup.h4
-rw-r--r--ldso/ldso/powerpc/elfinterp.c50
-rw-r--r--ldso/ldso/sh/dl-startup.h2
-rw-r--r--ldso/ldso/sh/elfinterp.c28
-rw-r--r--ldso/ldso/sh64/dl-startup.h2
-rw-r--r--ldso/ldso/sh64/dl-sysdep.h2
-rw-r--r--ldso/ldso/sh64/elfinterp.c30
-rw-r--r--ldso/ldso/xtensa/elfinterp.c48
25 files changed, 183 insertions, 183 deletions
diff --git a/ldso/ldso/arm/dl-startup.h b/ldso/ldso/arm/dl-startup.h
index 2dfdaffda..f7d605267 100644
--- a/ldso/ldso/arm/dl-startup.h
+++ b/ldso/ldso/arm/dl-startup.h
@@ -141,7 +141,7 @@ static __always_inline
void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
{
- switch (ELF32_R_TYPE(rpnt->r_info)) {
+ switch (ELF_R_TYPE(rpnt->r_info)) {
case R_ARM_NONE:
break;
case R_ARM_ABS32:
diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c
index cde055d59..b6dfae26b 100644
--- a/ldso/ldso/arm/elfinterp.c
+++ b/ldso/ldso/arm/elfinterp.c
@@ -47,7 +47,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
ELF_RELOC *this_reloc;
char *strtab;
char *symname;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rel_addr;
int symtab_index;
unsigned long new_addr;
@@ -57,9 +57,9 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
rel_addr = (ELF_RELOC *) tpnt->dynamic_info[DT_JMPREL];
this_reloc = rel_addr + reloc_entry;
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -102,12 +102,12 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
int i;
char *strtab;
int goof = 0;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -115,13 +115,13 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *) rel_addr;
rel_size = rel_size / sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
@@ -137,7 +137,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (unlikely(res <0))
{
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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
@@ -182,7 +182,7 @@ fix_bad_pc24 (unsigned long *const reloc_addr, unsigned long value)
static int
_dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -195,8 +195,8 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
reloc_addr = (unsigned long *) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
@@ -212,7 +212,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
* here, so all bases should be covered.
*/
if (!symbol_addr && (ELF_ST_TYPE(symtab[symtab_index].st_info) != STT_TLS)
- && (ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
+ && (ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
/* This may be non-fatal if called from dlopen. */
return 1;
@@ -314,13 +314,13 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
static int
_dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
unsigned long *reloc_addr;
reloc_addr = (unsigned long *) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
{
diff --git a/ldso/ldso/avr32/dl-startup.h b/ldso/ldso/avr32/dl-startup.h
index 066f65fc2..a7179e4cd 100644
--- a/ldso/ldso/avr32/dl-startup.h
+++ b/ldso/ldso/avr32/dl-startup.h
@@ -75,7 +75,7 @@ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr,
unsigned long load_addr, Elf32_Sym *symtab)
{
- switch(ELF32_R_TYPE(rpnt->r_info)) {
+ switch(ELF_R_TYPE(rpnt->r_info)) {
case R_AVR32_NONE:
break;
case R_AVR32_GLOB_DAT:
@@ -91,7 +91,7 @@ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
break;
default:
SEND_STDERR("BOOTSTRAP_RELOC: unhandled reloc_type ");
- SEND_NUMBER_STDERR(ELF32_R_TYPE(rpnt->r_info), 1);
+ SEND_NUMBER_STDERR(ELF_R_TYPE(rpnt->r_info), 1);
SEND_STDERR("REL, SYMBOL, LOAD: ");
SEND_ADDRESS_STDERR(reloc_addr, 0);
SEND_STDERR(", ");
diff --git a/ldso/ldso/avr32/elfinterp.c b/ldso/ldso/avr32/elfinterp.c
index dd17fdc87..17f34fae8 100644
--- a/ldso/ldso/avr32/elfinterp.c
+++ b/ldso/ldso/avr32/elfinterp.c
@@ -34,7 +34,7 @@ unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got)
*/
#if 0
struct elf_resolve *tpnt = (struct elf_resolve *)got[1];
- Elf32_Sym *sym;
+ ElfW(Sym) *sym;
unsigned long local_gotno;
unsigned long gotsym;
unsigned long new_addr;
@@ -45,7 +45,7 @@ unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got)
local_gotno = tpnt->dynamic_info[DT_AVR32_LOCAL_GOTNO];
gotsym = tpnt->dynamic_info[DT_AVR32_GOTSYM];
- sym = ((Elf32_Sym *)(tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr))
+ sym = ((ElfW(Sym) *)(tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr))
+ sym_index;
strtab = (char *)(tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr);
symname = strtab + sym->st_name;
@@ -66,22 +66,22 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_func)(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- Elf32_Rela *rpnt, Elf32_Sym *symtab, char *strtab))
+ ElfW(Rela) *rpnt, ElfW(Sym) *symtab, char *strtab))
{
- Elf32_Sym *symtab;
- Elf32_Rela *rpnt;
+ ElfW(Sym) *symtab;
+ ElfW(Rela) *rpnt;
char *strtab;
int i;
- rpnt = (Elf32_Rela *)rel_addr;
- rel_size /= sizeof(Elf32_Rela);
- symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ rpnt = (ElfW(Rela) *)rel_addr;
+ rel_size /= sizeof(ElfW(Rela));
+ symtab = (ElfW(Sym) *)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int symtab_index, res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab, strtab, symtab_index);
debug_reloc(symtab, strtab, rpnt);
@@ -98,7 +98,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
strtab + symtab[symtab_index].st_name);
if (res < 0) {
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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));
@@ -117,7 +117,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
}
static int _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- Elf32_Rela *rpnt, Elf32_Sym *symtab, char *strtab)
+ ElfW(Rela) *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -130,8 +130,8 @@ static int _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
struct symbol_ref sym_ref;
reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
@@ -144,7 +144,7 @@ static int _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
/* Allow undefined references to weak symbols */
if (!symbol_addr &&
- ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
+ ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
_dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
_dl_progname, symname);
return 0;
diff --git a/ldso/ldso/bfin/dl-startup.h b/ldso/ldso/bfin/dl-startup.h
index 3279d3e8d..369c187cd 100644
--- a/ldso/ldso/bfin/dl-startup.h
+++ b/ldso/ldso/bfin/dl-startup.h
@@ -108,7 +108,7 @@ _dl_start (Elf32_Addr dl_boot_got_pointer, \
* load address.
*/
#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- switch(ELF32_R_TYPE((RELP)->r_info)){ \
+ switch(ELF_R_TYPE((RELP)->r_info)){ \
case R_BFIN_BYTE4_DATA: \
*(REL) += (SYMBOL); \
break; \
diff --git a/ldso/ldso/bfin/elfinterp.c b/ldso/ldso/bfin/elfinterp.c
index 3d14126c4..20966fc2b 100644
--- a/ldso/ldso/bfin/elfinterp.c
+++ b/ldso/ldso/bfin/elfinterp.c
@@ -57,7 +57,7 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
diff --git a/ldso/ldso/c6x/dl-startup.h b/ldso/ldso/c6x/dl-startup.h
index b9ea30409..6ad801f1b 100644
--- a/ldso/ldso/c6x/dl-startup.h
+++ b/ldso/ldso/c6x/dl-startup.h
@@ -92,7 +92,7 @@ struct elf32_dsbt_loadmap;
* load address.
*/
#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- switch(ELF32_R_TYPE((RELP)->r_info)){ \
+ switch(ELF_R_TYPE((RELP)->r_info)){ \
case R_C6000_ABS_L16: \
{ \
unsigned int opcode = *(REL); \
diff --git a/ldso/ldso/c6x/elfinterp.c b/ldso/ldso/c6x/elfinterp.c
index f5d3ad41e..3772f90b3 100644
--- a/ldso/ldso/c6x/elfinterp.c
+++ b/ldso/ldso/c6x/elfinterp.c
@@ -61,7 +61,7 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -99,11 +99,11 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc) (struct elf_resolve *tpnt, struct dyn_elf *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -111,13 +111,13 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
rpnt = (ELF_RELOC *)rel_addr;
rel_size = rel_size / sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
@@ -131,7 +131,7 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
_dl_dprintf(2, "symbol '%s': ", strtab + symtab[symtab_index].st_name);
if (res <0) {
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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
@@ -149,7 +149,7 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
static int
_dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -162,13 +162,13 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
reloc_addr = (unsigned long *)(intptr_t)
DL_RELOC_ADDR (tpnt->loadaddr, rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
reloc_addend = rpnt->r_addend;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
symname = strtab + symtab[symtab_index].st_name;
- if (ELF32_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
+ if (ELF_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
symbol_addr = (unsigned long)
DL_RELOC_ADDR (tpnt->loadaddr, symtab[symtab_index].st_value);
} else {
@@ -181,7 +181,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
* here, so all bases should be covered.
*/
- if (!symbol_addr && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
+ if (!symbol_addr && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
_dl_dprintf (2, "%s: can't resolve symbol '%s'\n",
_dl_progname, strtab + symtab[symtab_index].st_name);
_dl_exit (1);
diff --git a/ldso/ldso/cris/dl-startup.h b/ldso/ldso/cris/dl-startup.h
index 0bc48f878..57f84eab6 100644
--- a/ldso/ldso/cris/dl-startup.h
+++ b/ldso/ldso/cris/dl-startup.h
@@ -57,7 +57,7 @@ static __always_inline
void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
{
- switch (ELF32_R_TYPE(rpnt->r_info)) {
+ switch (ELF_R_TYPE(rpnt->r_info)) {
case R_CRIS_GLOB_DAT:
case R_CRIS_JUMP_SLOT:
case R_CRIS_32:
diff --git a/ldso/ldso/cris/elfinterp.c b/ldso/ldso/cris/elfinterp.c
index cc4920d94..5ad302559 100644
--- a/ldso/ldso/cris/elfinterp.c
+++ b/ldso/ldso/cris/elfinterp.c
@@ -47,16 +47,16 @@ _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
char *new_addr;
char *rel_addr;
char **got_addr;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *this_reloc;
unsigned long instr_addr;
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -94,25 +94,25 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc)(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
int symtab_index;
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
/* Parse the relocation information. */
rpnt = (ELF_RELOC *)(intptr_t)rel_addr;
rel_size /= sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab, strtab, symtab_index);
debug_reloc(symtab, strtab, rpnt);
@@ -130,7 +130,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
strtab + symtab[symtab_index].st_name);
if (unlikely(res < 0)) {
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ int reloc_type = ELF_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
_dl_dprintf(2, "can't handle reloc type %s\n",
@@ -151,7 +151,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -164,8 +164,8 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
struct symbol_ref sym_ref;
reloc_addr = (unsigned long *)(intptr_t)(tpnt->loadaddr + (unsigned long)rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
@@ -173,14 +173,14 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (symtab_index) {
if (symtab[symtab_index].st_shndx != SHN_UNDEF &&
- ELF32_ST_BIND(symtab[symtab_index].st_info) == STB_LOCAL) {
+ ELF_ST_BIND(symtab[symtab_index].st_info) == STB_LOCAL) {
symbol_addr = (unsigned long)tpnt->loadaddr;
} else {
symbol_addr = (unsigned long)_dl_find_hash(symname, scope, tpnt,
elf_machine_type_class(reloc_type), &sym_ref);
}
- if (unlikely(!symbol_addr && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
+ if (unlikely(!symbol_addr && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
_dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
_dl_exit(1);
}
@@ -235,7 +235,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
unsigned long *reloc_addr;
@@ -249,7 +249,7 @@ _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
(void)strtab;
reloc_addr = (unsigned long *)(intptr_t)(tpnt->loadaddr + (unsigned long)rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
old_val = *reloc_addr;
diff --git a/ldso/ldso/frv/dl-startup.h b/ldso/ldso/frv/dl-startup.h
index fd5edddb9..2aa7baa56 100644
--- a/ldso/ldso/frv/dl-startup.h
+++ b/ldso/ldso/frv/dl-startup.h
@@ -87,7 +87,7 @@ _dl_boot (void *dl_boot_got_pointer, \
* load address.
*/
#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- switch(ELF32_R_TYPE((RELP)->r_info)){ \
+ switch(ELF_R_TYPE((RELP)->r_info)){ \
case R_FRV_32: \
*(REL) += (SYMBOL); \
break; \
diff --git a/ldso/ldso/frv/elfinterp.c b/ldso/ldso/frv/elfinterp.c
index 726b58b09..6cb09f81f 100644
--- a/ldso/ldso/frv/elfinterp.c
+++ b/ldso/ldso/frv/elfinterp.c
@@ -28,7 +28,7 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
int symtab_index;
char *rel_addr;
struct elf_resolve *new_tpnt;
@@ -41,9 +41,9 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
tpnt->loadaddr);
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)(intptr_t)
+ symtab = (ElfW(Sym) *)(intptr_t)
DL_RELOC_ADDR (tpnt->dynamic_info[DT_SYMTAB],
tpnt->loadaddr);
strtab = DL_RELOC_ADDR (tpnt->dynamic_info[DT_STRTAB], tpnt->loadaddr);
@@ -94,11 +94,11 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -106,14 +106,14 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *)(intptr_t) DL_RELOC_ADDR (rel_addr, tpnt->loadaddr);
rel_size = rel_size / sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)(intptr_t)
+ symtab = (ElfW(Sym) *)(intptr_t)
DL_RELOC_ADDR (tpnt->dynamic_info[DT_SYMTAB], tpnt->loadaddr);
strtab = DL_RELOC_ADDR (tpnt->dynamic_info[DT_STRTAB], tpnt->loadaddr);
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
@@ -128,7 +128,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (res <0)
{
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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
@@ -147,7 +147,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -165,12 +165,12 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
reloc_addr = (unsigned long *)(intptr_t)
DL_RELOC_ADDR (rpnt->r_offset, tpnt->loadaddr);
__asm__ ("" : "=r" (reloc_addr_packed) : "0" (reloc_addr));
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
symname = strtab + symtab[symtab_index].st_name;
- if (ELF32_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
+ if (ELF_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
symbol_addr = (unsigned long)
DL_RELOC_ADDR (symtab[symtab_index].st_value,
tpnt->loadaddr);
@@ -186,7 +186,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
* here, so all bases should be covered.
*/
- if (!symbol_addr && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
+ if (!symbol_addr && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
_dl_dprintf (2, "%s: can't resolve symbol '%s'\n",
_dl_progname, strtab + symtab[symtab_index].st_name);
_dl_exit (1);
@@ -220,7 +220,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
symbols must be ignored, because it
may hold the address of a lazy PLT
entry. */
- if (ELF32_ST_BIND
+ if (ELF_ST_BIND
(symtab[symtab_index].st_info)
== STB_LOCAL)
funcval.entry_point += *reloc_addr;
@@ -277,7 +277,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
static int
_dl_do_lazy_reloc (struct elf_resolve *tpnt,
struct r_scope_elem *scope __attribute_used__,
- ELF_RELOC *rpnt, Elf32_Sym *symtab __attribute_used__,
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab __attribute_used__,
char *strtab __attribute_used__)
{
int reloc_type;
@@ -289,7 +289,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt,
reloc_addr = (struct funcdesc_value *)(intptr_t)
DL_RELOC_ADDR (rpnt->r_offset, tpnt->loadaddr);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
old_val = (unsigned long)reloc_addr->entry_point;
diff --git a/ldso/ldso/i386/dl-startup.h b/ldso/ldso/i386/dl-startup.h
index 0c3451488..973ed72cb 100644
--- a/ldso/ldso/i386/dl-startup.h
+++ b/ldso/ldso/i386/dl-startup.h
@@ -44,7 +44,7 @@ static __always_inline
void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr, unsigned long load_addr, attribute_unused Elf32_Sym *symtab)
{
- switch (ELF32_R_TYPE(rpnt->r_info))
+ switch (ELF_R_TYPE(rpnt->r_info))
{
case R_386_32:
*reloc_addr += symbol_addr;
diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c
index 9772e9a46..aadb00add 100644
--- a/ldso/ldso/i386/elfinterp.c
+++ b/ldso/ldso/i386/elfinterp.c
@@ -49,7 +49,7 @@ _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
int symtab_index;
char *rel_addr;
char *new_addr;
@@ -59,9 +59,9 @@ _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -101,11 +101,11 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc)(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -113,13 +113,13 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *)(intptr_t)rel_addr;
rel_size /= sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab, strtab, symtab_index);
debug_reloc(symtab, strtab, rpnt);
@@ -136,7 +136,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
strtab + symtab[symtab_index].st_name);
if (unlikely(res < 0)) {
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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",
@@ -157,7 +157,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -171,8 +171,8 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
struct symbol_ref sym_ref;
reloc_addr = (unsigned long *)(intptr_t)(tpnt->loadaddr + (unsigned long)rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
@@ -188,7 +188,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
* symbols here, so all bases should be covered.
*/
if (unlikely(!symbol_addr && (ELF_ST_TYPE(symtab[symtab_index].st_info) != STT_TLS)
- && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK))
+ && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK))
return 1;
if (_dl_trace_prelink) {
_dl_debug_lookup (symname, tpnt, &symtab[symtab_index],
@@ -270,7 +270,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
unsigned long *reloc_addr;
@@ -283,7 +283,7 @@ _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
(void)strtab;
reloc_addr = (unsigned long *)(intptr_t)(tpnt->loadaddr + (unsigned long)rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
old_val = *reloc_addr;
diff --git a/ldso/ldso/m68k/dl-startup.h b/ldso/ldso/m68k/dl-startup.h
index 13530e05c..8755ecf92 100644
--- a/ldso/ldso/m68k/dl-startup.h
+++ b/ldso/ldso/m68k/dl-startup.h
@@ -60,7 +60,7 @@ static __always_inline
void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
{
- switch (ELF32_R_TYPE(rpnt->r_info))
+ switch (ELF_R_TYPE(rpnt->r_info))
{
case R_68K_8:
*(char *) reloc_addr = symbol_addr + rpnt->r_addend;
diff --git a/ldso/ldso/microblaze/dl-startup.h b/ldso/ldso/microblaze/dl-startup.h
index 0d3f3bf15..44966d6fd 100644
--- a/ldso/ldso/microblaze/dl-startup.h
+++ b/ldso/ldso/microblaze/dl-startup.h
@@ -86,7 +86,7 @@ void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
unsigned long symbol_addr, unsigned long load_addr, attribute_unused Elf32_Sym *symtab)
{
- switch (ELF32_R_TYPE(rpnt->r_info))
+ switch (ELF_R_TYPE(rpnt->r_info))
{
case R_MICROBLAZE_REL:
diff --git a/ldso/ldso/mips/elfinterp.c b/ldso/ldso/mips/elfinterp.c
index 5d0eff53b..e57a99fbe 100644
--- a/ldso/ldso/mips/elfinterp.c
+++ b/ldso/ldso/mips/elfinterp.c
@@ -89,7 +89,7 @@ __dl_runtime_pltresolve(struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
int symtab_index;
char *rel_addr;
char *new_addr;
@@ -99,9 +99,9 @@ __dl_runtime_pltresolve(struct elf_resolve *tpnt, int reloc_entry)
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -193,7 +193,7 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt,
scope,
tpnt,
elf_machine_type_class(reloc_type), &sym_ref);
- if (unlikely(!symbol_addr && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK))
+ if (unlikely(!symbol_addr && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK))
return 1;
if (_dl_trace_prelink) {
_dl_debug_lookup (symname, tpnt, &symtab[symtab_index],
@@ -224,7 +224,7 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt,
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
- if (ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_LOCAL) {
+ if (ELF_ST_BIND(symtab[symtab_index].st_info) != STB_LOCAL) {
symbol_addr = (unsigned long) _dl_find_hash(symname, scope,
tpnt, elf_machine_type_class(reloc_type), &sym_ref);
tls_tpnt = sym_ref.tpnt;
diff --git a/ldso/ldso/powerpc/dl-startup.h b/ldso/ldso/powerpc/dl-startup.h
index e471aa033..d7b554823 100644
--- a/ldso/ldso/powerpc/dl-startup.h
+++ b/ldso/ldso/powerpc/dl-startup.h
@@ -73,7 +73,7 @@ __asm__(
* load address.
*/
#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- {int type=ELF32_R_TYPE((RELP)->r_info); \
+ {int type=ELF_R_TYPE((RELP)->r_info); \
Elf32_Addr finaladdr=(SYMBOL)+(RELP)->r_addend;\
if (type==R_PPC_RELATIVE) { \
*REL=(Elf32_Word)(LOAD)+(RELP)->r_addend;\
@@ -84,6 +84,6 @@ __asm__(
*REL=OPCODE_B(delta); \
PPC_DCBST(REL); PPC_SYNC; PPC_ICBI(REL);\
} else { \
- _dl_exit(100+ELF32_R_TYPE((RELP)->r_info));\
+ _dl_exit(100+ELF_R_TYPE((RELP)->r_info));\
} \
}
diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c
index 507913035..fe7afe54e 100644
--- a/ldso/ldso/powerpc/elfinterp.c
+++ b/ldso/ldso/powerpc/elfinterp.c
@@ -109,20 +109,20 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rel_addr;
int symtab_index;
char *symname;
- Elf32_Addr *reloc_addr;
- Elf32_Addr finaladdr;
+ ElfW(Addr) *reloc_addr;
+ ElfW(Addr) finaladdr;
Elf32_Sword delta;
rel_addr = (ELF_RELOC *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (void *)rel_addr + reloc_entry;
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -130,15 +130,15 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
debug_reloc(symtab,strtab,this_reloc);
/* Address of dump instruction to fix up */
- reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + this_reloc->r_offset);
+ reloc_addr = (ElfW(Addr) *) (tpnt->loadaddr + this_reloc->r_offset);
#if defined (__SUPPORT_LD_DEBUG__)
if (_dl_debug_reloc && _dl_debug_detail)
- _dl_dprintf(_dl_debug_file, "\n\tResolving symbol %s %x --> ", symname, (Elf32_Addr)reloc_addr);
+ _dl_dprintf(_dl_debug_file, "\n\tResolving symbol %s %x --> ", symname, (ElfW(Addr))reloc_addr);
#endif
/* Get the address of the GOT entry */
- finaladdr = (Elf32_Addr) _dl_find_hash(symname,
+ finaladdr = (ElfW(Addr)) _dl_find_hash(symname,
&_dl_loaded_modules->symbol_scope, tpnt, ELF_RTYPE_CLASS_PLT, NULL);
if (unlikely(!finaladdr)) {
_dl_dprintf(2, "%s: can't resolve symbol '%s' in lib '%s'.\n", _dl_progname, symname, tpnt->libname);
@@ -183,13 +183,13 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
static __inline__ int
_dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
struct symbol_ref sym_ref;
- Elf32_Addr *reloc_addr;
- Elf32_Addr finaladdr;
+ ElfW(Addr) *reloc_addr;
+ ElfW(Addr) finaladdr;
struct elf_resolve *tls_tpnt = NULL;
unsigned long symbol_addr;
char *symname;
@@ -198,9 +198,9 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
#endif
symbol_addr = tpnt->loadaddr; /* For R_PPC_RELATIVE */
- reloc_addr = (Elf32_Addr *)(intptr_t) (symbol_addr + (unsigned long) rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_addr = (ElfW(Addr) *)(intptr_t) (symbol_addr + (unsigned long) rpnt->r_offset);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
symname = strtab + sym_ref.sym->st_name;
@@ -212,8 +212,8 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
* here, so all bases should be covered.
*/
if (unlikely(!symbol_addr
- && (ELF32_ST_TYPE(sym_ref.sym->st_info) != STT_TLS
- && ELF32_ST_BIND(sym_ref.sym->st_info) != STB_WEAK)))
+ && (ELF_ST_TYPE(sym_ref.sym->st_info) != STT_TLS
+ && ELF_ST_BIND(sym_ref.sym->st_info) != STB_WEAK)))
return 1;
if (_dl_trace_prelink) {
_dl_debug_lookup (symname, tpnt, &symtab[symtab_index],
@@ -227,7 +227,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
#if defined (__SUPPORT_LD_DEBUG__)
old_val = *reloc_addr;
#endif
- finaladdr = (Elf32_Addr) (symbol_addr + rpnt->r_addend);
+ finaladdr = (ElfW(Addr)) (symbol_addr + rpnt->r_addend);
switch (reloc_type) {
case R_PPC_RELATIVE:
@@ -348,11 +348,11 @@ void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
plt = (Elf32_Word *)tpnt->dynamic_info[DT_PLTGOT];
if (tpnt->dynamic_info[DT_PPC_GOT_IDX] != 0) {
/* Secure PLT */
- Elf32_Addr *got = (Elf32_Addr *)tpnt->dynamic_info[DT_PPC_GOT_IDX];
+ ElfW(Addr) *got = (ElfW(Addr) *)tpnt->dynamic_info[DT_PPC_GOT_IDX];
Elf32_Word dlrr = (Elf32_Word) _dl_linux_resolve;
- got[1] = (Elf32_Addr) dlrr;
- got[2] = (Elf32_Addr) tpnt;
+ got[1] = (ElfW(Addr)) dlrr;
+ got[2] = (ElfW(Addr)) tpnt;
/* Relocate everything in .plt by the load address offset. */
while (num_plt_entries-- != 0)
@@ -394,11 +394,11 @@ static __inline__ int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -406,13 +406,13 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *)(intptr_t)rel_addr;
rel_size = rel_size / sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
@@ -428,7 +428,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (unlikely(res <0))
{
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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
diff --git a/ldso/ldso/sh/dl-startup.h b/ldso/ldso/sh/dl-startup.h
index ae7e2248d..2f91d0f1a 100644
--- a/ldso/ldso/sh/dl-startup.h
+++ b/ldso/ldso/sh/dl-startup.h
@@ -48,7 +48,7 @@ __asm__(
* load address.
*/
#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- switch(ELF32_R_TYPE((RELP)->r_info)){ \
+ switch(ELF_R_TYPE((RELP)->r_info)){ \
case R_SH_REL32: \
*(REL) = (SYMBOL) + (RELP)->r_addend \
- (unsigned long)(REL); \
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c
index 35d2971b4..e6ff6a37a 100644
--- a/ldso/ldso/sh/elfinterp.c
+++ b/ldso/ldso/sh/elfinterp.c
@@ -47,7 +47,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
int symtab_index;
char *rel_addr;
char *new_addr;
@@ -58,9 +58,9 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)(intptr_t) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -98,11 +98,11 @@ static int
_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
/* Now parse the relocation information */
@@ -110,13 +110,13 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *)(intptr_t) rel_addr;
rel_size = rel_size / sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
@@ -130,7 +130,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
_dl_dprintf(2, "symbol '%s': ", strtab + symtab[symtab_index].st_name);
if (unlikely(res < 0)) {
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ 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
@@ -149,7 +149,7 @@ _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
@@ -166,8 +166,8 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
struct symbol_ref sym_ref;
reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
@@ -184,7 +184,7 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (!symbol_addr
&& (ELF_ST_TYPE(symtab[symtab_index].st_info) != STT_TLS)
- && (ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
+ && (ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
_dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
_dl_progname, symname);
@@ -264,7 +264,7 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
unsigned long *reloc_addr;
@@ -276,7 +276,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
(void)strtab;
reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
old_val = *reloc_addr;
diff --git a/ldso/ldso/sh64/dl-startup.h b/ldso/ldso/sh64/dl-startup.h
index 753134114..89bfe1f20 100644
--- a/ldso/ldso/sh64/dl-startup.h
+++ b/ldso/ldso/sh64/dl-startup.h
@@ -48,7 +48,7 @@ __asm__("" \
#include <elf.h>
#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
- const unsigned int r_type = ELF32_R_TYPE((RELP)->r_info); \
+ const unsigned int r_type = ELF_R_TYPE((RELP)->r_info); \
int lsb = !!((SYMTAB)->st_other & STO_SH5_ISA32); \
\
switch (r_type) { \
diff --git a/ldso/ldso/sh64/dl-sysdep.h b/ldso/ldso/sh64/dl-sysdep.h
index 15d9b5eb9..043413931 100644
--- a/ldso/ldso/sh64/dl-sysdep.h
+++ b/ldso/ldso/sh64/dl-sysdep.h
@@ -128,7 +128,7 @@ elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
{
Elf32_Addr value, word;
Elf32_Rela *rpnt = (void *)rel_addr;
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ int reloc_type = ELF_R_TYPE(rpnt->r_info);
do {
Elf32_Addr *const reloc_addr =
diff --git a/ldso/ldso/sh64/elfinterp.c b/ldso/ldso/sh64/elfinterp.c
index 0d16f6b9d..3a59bc4be 100644
--- a/ldso/ldso/sh64/elfinterp.c
+++ b/ldso/ldso/sh64/elfinterp.c
@@ -49,7 +49,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
int symtab_index;
char *rel_addr;
char *new_addr;
@@ -60,9 +60,9 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM(this_reloc->r_info);
+ symtab_index = ELF_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -106,12 +106,12 @@ static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc)(struct elf_resolve *tpnt,
struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab,
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab,
char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -119,13 +119,13 @@ static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *)(intptr_t)rel_addr;
rel_size = rel_size / sizeof(ELF_RELOC);
- symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
debug_sym(symtab,strtab,symtab_index);
debug_reloc(symtab,strtab,rpnt);
@@ -140,7 +140,7 @@ static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
strtab + symtab[symtab_index].st_name);
if (unlikely(res < 0)) {
- int reloc_type = ELF32_R_TYPE(rpnt->r_info);
+ int reloc_type = ELF_R_TYPE(rpnt->r_info);
_dl_dprintf(2, "can't handle reloc type "
#ifdef __SUPPORT_LD_DEBUG__
@@ -163,7 +163,7 @@ static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
}
static int _dl_do_reloc(struct elf_resolve *tpnt,struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index, lsb;
@@ -175,8 +175,8 @@ static int _dl_do_reloc(struct elf_resolve *tpnt,struct r_scope_elem *scope,
#endif
struct symbol_ref sym_ref;
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
symbol_addr = 0;
lsb = !!(symtab[symtab_index].st_other & STO_SH5_ISA32);
sym_ref.sym = &symtab[symtab_index];
@@ -196,7 +196,7 @@ static int _dl_do_reloc(struct elf_resolve *tpnt,struct r_scope_elem *scope,
* might have been intentional. We should not be linking local
* symbols here, so all bases should be covered.
*/
- stb = ELF32_ST_BIND(symtab[symtab_index].st_info);
+ stb = ELF_ST_BIND(symtab[symtab_index].st_info);
if (stb != STB_WEAK && !symbol_addr) {
_dl_dprintf (2, "%s: can't resolve symbol '%s'\n",
@@ -295,7 +295,7 @@ static int _dl_do_reloc(struct elf_resolve *tpnt,struct r_scope_elem *scope,
}
static int _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type, symtab_index, lsb;
unsigned long *reloc_addr;
@@ -303,8 +303,8 @@ static int _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scop
unsigned long old_val;
#endif
- reloc_type = ELF32_R_TYPE(rpnt->r_info);
- symtab_index = ELF32_R_SYM(rpnt->r_info);
+ reloc_type = ELF_R_TYPE(rpnt->r_info);
+ symtab_index = ELF_R_SYM(rpnt->r_info);
lsb = !!(symtab[symtab_index].st_other & STO_SH5_ISA32);
reloc_addr = (unsigned long *)(intptr_t)
(tpnt->loadaddr + (unsigned long)rpnt->r_offset);
diff --git a/ldso/ldso/xtensa/elfinterp.c b/ldso/ldso/xtensa/elfinterp.c
index 23d1eb17c..b4cf9752d 100644
--- a/ldso/ldso/xtensa/elfinterp.c
+++ b/ldso/ldso/xtensa/elfinterp.c
@@ -37,7 +37,7 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
{
ELF_RELOC *this_reloc;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
int symtab_index;
char *rel_addr;
char *new_addr;
@@ -46,9 +46,9 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
rel_addr = (char *) tpnt->dynamic_info[DT_JMPREL];
this_reloc = (ELF_RELOC *) (rel_addr + reloc_entry);
- symtab_index = ELF32_R_SYM (this_reloc->r_info);
+ symtab_index = ELF_R_SYM (this_reloc->r_info);
- symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
symname = strtab + symtab[symtab_index].st_name;
@@ -85,11 +85,11 @@ static int
_dl_parse (struct elf_resolve *tpnt, struct r_scope_elem *scope,
unsigned long rel_addr, unsigned long rel_size,
int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab))
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
{
unsigned int i;
char *strtab;
- Elf32_Sym *symtab;
+ ElfW(Sym) *symtab;
ELF_RELOC *rpnt;
int symtab_index;
@@ -97,13 +97,13 @@ _dl_parse (struct elf_resolve *tpnt, struct r_scope_elem *scope,
rpnt = (ELF_RELOC *) rel_addr;
rel_size /= sizeof (ELF_RELOC);
- symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
+ symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
for (i = 0; i < rel_size; i++, rpnt++) {
int res;
- symtab_index = ELF32_R_SYM (rpnt->r_info);
+ symtab_index = ELF_R_SYM (rpnt->r_info);
debug_sym (symtab, strtab, symtab_index);
debug_reloc (symtab, strtab, rpnt);
@@ -120,7 +120,7 @@ _dl_parse (struct elf_resolve *tpnt, struct r_scope_elem *scope,
strtab + symtab[symtab_index].st_name);
if (unlikely (res < 0)) {
- int reloc_type = ELF32_R_TYPE (rpnt->r_info);
+ 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));
@@ -141,28 +141,28 @@ _dl_parse (struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
int symtab_index;
char *symname;
struct symbol_ref sym_ref;
- Elf32_Addr *reloc_addr;
- Elf32_Addr symbol_addr;
+ ElfW(Addr) *reloc_addr;
+ ElfW(Addr) symbol_addr;
#if defined (__SUPPORT_LD_DEBUG__)
- Elf32_Addr old_val;
+ ElfW(Addr) old_val;
#endif
- reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + rpnt->r_offset);
- reloc_type = ELF32_R_TYPE (rpnt->r_info);
- symtab_index = ELF32_R_SYM (rpnt->r_info);
+ reloc_addr = (ElfW(Addr) *) (tpnt->loadaddr + rpnt->r_offset);
+ reloc_type = ELF_R_TYPE (rpnt->r_info);
+ symtab_index = ELF_R_SYM (rpnt->r_info);
sym_ref.sym = &symtab[symtab_index];
sym_ref.tpnt = NULL;
symbol_addr = 0;
symname = strtab + sym_ref.sym->st_name;
if (symtab_index) {
- symbol_addr = (Elf32_Addr)
+ symbol_addr = (ElfW(Addr))
_dl_find_hash (symname, scope, tpnt,
elf_machine_type_class (reloc_type), &sym_ref);
@@ -172,7 +172,7 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
* here, so all bases should be covered.
*/
if (unlikely (!symbol_addr &&
- ELF32_ST_BIND (sym_ref.sym->st_info) != STB_WEAK)) {
+ ELF_ST_BIND (sym_ref.sym->st_info) != STB_WEAK)) {
_dl_dprintf (2, "%s: can't resolve symbol '%s'\n",
_dl_progname, symname);
_dl_exit (1);
@@ -200,10 +200,10 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
if (rpnt->r_addend == 1) {
/* Grab the function pointer stashed at the beginning of the
GOT by the GOT_INIT function. */
- *reloc_addr = *(Elf32_Addr *) tpnt->dynamic_info[DT_PLTGOT];
+ *reloc_addr = *(ElfW(Addr) *) tpnt->dynamic_info[DT_PLTGOT];
} else if (rpnt->r_addend == 2) {
/* Store the link map for the object. */
- *reloc_addr = (Elf32_Addr) tpnt;
+ *reloc_addr = (ElfW(Addr)) tpnt;
} else {
_dl_exit (1);
}
@@ -228,16 +228,16 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
static int
_dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
- ELF_RELOC *rpnt, Elf32_Sym *symtab, char *strtab)
+ ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
{
int reloc_type;
- Elf32_Addr *reloc_addr;
+ ElfW(Addr) *reloc_addr;
#if defined (__SUPPORT_LD_DEBUG__)
- Elf32_Addr old_val;
+ ElfW(Addr) old_val;
#endif
- reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + rpnt->r_offset);
- reloc_type = ELF32_R_TYPE (rpnt->r_info);
+ reloc_addr = (ElfW(Addr) *) (tpnt->loadaddr + rpnt->r_offset);
+ reloc_type = ELF_R_TYPE (rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
old_val = *reloc_addr;