(elf_machine_rel): Fixup R_ARM_PC24 relocs if possible.

This commit is contained in:
Ulrich Drepper 1999-12-08 07:35:32 +00:00
parent e22a3eb794
commit d1af493c6b
1 changed files with 17 additions and 0 deletions

View File

@ -443,6 +443,23 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
*reloc_addr += value;
break;
}
case R_ARM_PC24:
{
signed int addend;
addend = *reloc_addr & 0x00ffffff;
if (addend & 0x00800000) addend |= 0xff000000;
value = value - (unsigned int)reloc_addr + (addend << 2);
if (value & 0xfc000003)
_dl_signal_error (0, map->l_name,
"R_ARM_PC24 relocation out of range");
value = value >> 2;
value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff);
*reloc_addr = value;
}
break;
default:
_dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
break;