diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-27 17:51:42 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-27 17:51:42 +0000 |
commit | fd2791ba88b17fcd65075efc664e9c05fa4c1d29 (patch) | |
tree | a2827ec8e8510d555aa293b9a55f00fdbc47d14c | |
parent | 54cdfc81d536033ed705a7fe1f8f4eb9db9fac35 (diff) | |
download | glibc-fd2791ba88b17fcd65075efc664e9c05fa4c1d29.tar glibc-fd2791ba88b17fcd65075efc664e9c05fa4c1d29.tar.gz glibc-fd2791ba88b17fcd65075efc664e9c05fa4c1d29.tar.bz2 glibc-fd2791ba88b17fcd65075efc664e9c05fa4c1d29.zip |
(elf_machine_rel): Delete redundant debugging code. Correct handling
of PC24 relocs.
-rw-r--r-- | sysdeps/arm/dl-machine.h | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 7612285907..912f7863fb 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -398,35 +398,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, break; case R_ARM_GLOB_DAT: case R_ARM_JUMP_SLOT: - -#if 0 -#define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15]; -{ -char b[10]; -int j; -_HEX(map->l_addr); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(sym->st_size); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(&sym->st_value); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(sym->st_value); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(sym); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -_HEX(reloc_addr); -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -b[0]=' '; b[1]='\n'; -__asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " - : : "r"(b) : "r0", "r1", "r2" ); -} -#endif *reloc_addr = value; break; case R_ARM_ABS32: @@ -451,7 +422,12 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; " break; } case R_ARM_PC24: - *reloc_addr += (value - (Elf32_Addr) reloc_addr); + { + long int disp = (value - (Elf32_Addr) reloc_addr) / 4; + if ((disp >= (1<<24)) || (disp <= -(1<<24))) + assert (! "address out of range for PC24 reloc"); + *reloc_addr += disp; + } break; default: assert (! "unexpected dynamic reloc type"); |