Merge "Refactoring: use generic reloc constants"
This commit is contained in:
commit
a23569c948
@ -1320,29 +1320,25 @@ int soinfo::relocate(ElfW(Rela)* rela, unsigned count, const soinfo_list_t& glob
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case R_GENERIC_JUMP_SLOT:
|
||||||
|
case R_GENERIC_GLOB_DAT:
|
||||||
|
case R_GENERIC_RELATIVE:
|
||||||
|
case R_GENERIC_IRELATIVE:
|
||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__)
|
||||||
case R_AARCH64_JUMP_SLOT:
|
|
||||||
case R_AARCH64_GLOB_DAT:
|
|
||||||
case R_AARCH64_ABS64:
|
case R_AARCH64_ABS64:
|
||||||
case R_AARCH64_ABS32:
|
case R_AARCH64_ABS32:
|
||||||
case R_AARCH64_ABS16:
|
case R_AARCH64_ABS16:
|
||||||
case R_AARCH64_RELATIVE:
|
#elif defined(__x86_64__)
|
||||||
case R_AARCH64_IRELATIVE:
|
case R_X86_64_32:
|
||||||
|
case R_X86_64_64:
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* The sym_addr was initialized to be zero above, or the relocation
|
* The sym_addr was initialized to be zero above, or the relocation
|
||||||
* code below does not care about value of sym_addr.
|
* code below does not care about value of sym_addr.
|
||||||
* No need to do anything.
|
* No need to do anything.
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
#elif defined(__x86_64__)
|
#if defined(__x86_64__)
|
||||||
case R_X86_64_JUMP_SLOT:
|
|
||||||
case R_X86_64_GLOB_DAT:
|
|
||||||
case R_X86_64_32:
|
|
||||||
case R_X86_64_64:
|
|
||||||
case R_X86_64_RELATIVE:
|
|
||||||
case R_X86_64_IRELATIVE:
|
|
||||||
// No need to do anything.
|
|
||||||
break;
|
|
||||||
case R_X86_64_PC32:
|
case R_X86_64_PC32:
|
||||||
sym_addr = reloc;
|
sym_addr = reloc;
|
||||||
break;
|
break;
|
||||||
@ -1591,11 +1587,6 @@ int soinfo::relocate(ElfW(Rel)* rel, unsigned count, const soinfo_list_t& global
|
|||||||
sym_addr = reloc;
|
sym_addr = reloc;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__arm__)
|
|
||||||
case R_ARM_COPY:
|
|
||||||
// Fall through. Can't really copy if weak symbol is not found at run-time.
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
DL_ERR("unknown weak reloc type %d @ %p (%zu)", type, rel, idx);
|
DL_ERR("unknown weak reloc type %d @ %p (%zu)", type, rel, idx);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user