summaryrefslogtreecommitdiff
path: root/ldso/ldso/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso/sparc')
-rw-r--r--ldso/ldso/sparc/dl-sysdep.h2
-rw-r--r--ldso/ldso/sparc/elfinterp.c19
2 files changed, 10 insertions, 11 deletions
diff --git a/ldso/ldso/sparc/dl-sysdep.h b/ldso/ldso/sparc/dl-sysdep.h
index 7559a80d2..198088b3c 100644
--- a/ldso/ldso/sparc/dl-sysdep.h
+++ b/ldso/ldso/sparc/dl-sysdep.h
@@ -160,7 +160,7 @@ static inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
- Elf32_Rela * rpnt = (void *) (rel_addr + load_off);
+ Elf32_Rela * rpnt = (void *)rel_addr;
--rpnt;
do {
Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
diff --git a/ldso/ldso/sparc/elfinterp.c b/ldso/ldso/sparc/elfinterp.c
index 423ae190a..a84507b91 100644
--- a/ldso/ldso/sparc/elfinterp.c
+++ b/ldso/ldso/sparc/elfinterp.c
@@ -66,8 +66,7 @@ unsigned int _dl_linux_resolver(unsigned int reloc_entry, unsigned int * plt)
unsigned int instr_addr;
tpnt = (struct elf_resolve *) plt[2];
- rel_addr = (Elf32_Rela *) (tpnt->dynamic_info[DT_JMPREL] +
- tpnt->loadaddr);
+ rel_addr = (Elf32_Rela *)tpnt->dynamic_info[DT_JMPREL];
/*
* Generate the correct relocation index into the .rela.plt section.
@@ -79,8 +78,8 @@ unsigned int _dl_linux_resolver(unsigned int reloc_entry, unsigned int * plt)
reloc_type = ELF32_R_TYPE(this_reloc->r_info);
symtab_index = ELF32_R_SYM(this_reloc->r_info);
- symtab = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr);
- strtab = (char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr);
+ symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
#ifdef __SUPPORT_LD_DEBUG__
if (_dl_debug_symbols) {
@@ -159,10 +158,10 @@ void _dl_parse_lazy_relocation_information(struct dyn_elf *arg_rpnt,
struct elf_resolve * tpnt = arg_rpnt->dyn;
/* Now parse the relocation information */
- rpnt = (Elf32_Rela *) (rel_addr + tpnt->loadaddr);
+ rpnt = (Elf32_Rela *)rel_addr;
- symtab = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr);
- strtab = ( char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr);
+ symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ strtab = ( char *)tpnt->dynamic_info[DT_STRTAB];
for(i=0; i< rel_size; i += sizeof(Elf32_Rela), rpnt++){
reloc_addr = (int *) (tpnt->loadaddr + (int)rpnt->r_offset);
@@ -201,10 +200,10 @@ int _dl_parse_relocation_information(struct dyn_elf *arg_rpnt,
struct elf_resolve * tpnt = arg_rpnt->dyn;
/* Now parse the relocation information */
- rpnt = (Elf32_Rela *) (rel_addr + tpnt->loadaddr);
+ rpnt = (Elf32_Rela *)rel_addr;
- symtab = (Elf32_Sym *) (tpnt->dynamic_info[DT_SYMTAB] + tpnt->loadaddr);
- strtab = ( char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr);
+ symtab = (Elf32_Sym *)tpnt->dynamic_info[DT_SYMTAB];
+ strtab = ( char *)tpnt->dynamic_info[DT_STRTAB];
for(i=0; i< rel_size; i+= sizeof(Elf32_Rela), rpnt++){
reloc_addr = (int *) (tpnt->loadaddr + (int)rpnt->r_offset);