diff --git a/linker/linker.cpp b/linker/linker.cpp index cee9c3b31..2ea2665fa 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -3065,8 +3065,6 @@ bool soinfo::relocate(const VersionTracker& version_tracker, ElfRelIteratorT&& r case R_GENERIC_TLSDESC: #if defined(__aarch64__) case R_AARCH64_ABS64: - case R_AARCH64_ABS32: - case R_AARCH64_ABS16: #elif defined(__x86_64__) case R_X86_64_32: case R_X86_64_64: @@ -3304,86 +3302,6 @@ bool soinfo::relocate(const VersionTracker& version_tracker, ElfRelIteratorT&& r reloc, sym_addr + addend, sym_name); *reinterpret_cast(reloc) = sym_addr + addend; break; - case R_AARCH64_ABS32: - count_relocation(kRelocAbsolute); - MARK(rel->r_offset); - TRACE_TYPE(RELO, "RELO ABS32 %16llx <- %16llx %s\n", - reloc, sym_addr + addend, sym_name); - { - const ElfW(Addr) min_value = static_cast(INT32_MIN); - const ElfW(Addr) max_value = static_cast(UINT32_MAX); - if ((min_value <= (sym_addr + addend)) && - ((sym_addr + addend) <= max_value)) { - *reinterpret_cast(reloc) = sym_addr + addend; - } else { - DL_ERR("0x%016llx out of range 0x%016llx to 0x%016llx", - sym_addr + addend, min_value, max_value); - return false; - } - } - break; - case R_AARCH64_ABS16: - count_relocation(kRelocAbsolute); - MARK(rel->r_offset); - TRACE_TYPE(RELO, "RELO ABS16 %16llx <- %16llx %s\n", - reloc, sym_addr + addend, sym_name); - { - const ElfW(Addr) min_value = static_cast(INT16_MIN); - const ElfW(Addr) max_value = static_cast(UINT16_MAX); - if ((min_value <= (sym_addr + addend)) && - ((sym_addr + addend) <= max_value)) { - *reinterpret_cast(reloc) = (sym_addr + addend); - } else { - DL_ERR("0x%016llx out of range 0x%016llx to 0x%016llx", - sym_addr + addend, min_value, max_value); - return false; - } - } - break; - case R_AARCH64_PREL64: - count_relocation(kRelocRelative); - MARK(rel->r_offset); - TRACE_TYPE(RELO, "RELO REL64 %16llx <- %16llx - %16llx %s\n", - reloc, sym_addr + addend, rel->r_offset, sym_name); - *reinterpret_cast(reloc) = sym_addr + addend - rel->r_offset; - break; - case R_AARCH64_PREL32: - count_relocation(kRelocRelative); - MARK(rel->r_offset); - TRACE_TYPE(RELO, "RELO REL32 %16llx <- %16llx - %16llx %s\n", - reloc, sym_addr + addend, rel->r_offset, sym_name); - { - const ElfW(Addr) min_value = static_cast(INT32_MIN); - const ElfW(Addr) max_value = static_cast(UINT32_MAX); - if ((min_value <= (sym_addr + addend - rel->r_offset)) && - ((sym_addr + addend - rel->r_offset) <= max_value)) { - *reinterpret_cast(reloc) = sym_addr + addend - rel->r_offset; - } else { - DL_ERR("0x%016llx out of range 0x%016llx to 0x%016llx", - sym_addr + addend - rel->r_offset, min_value, max_value); - return false; - } - } - break; - case R_AARCH64_PREL16: - count_relocation(kRelocRelative); - MARK(rel->r_offset); - TRACE_TYPE(RELO, "RELO REL16 %16llx <- %16llx - %16llx %s\n", - reloc, sym_addr + addend, rel->r_offset, sym_name); - { - const ElfW(Addr) min_value = static_cast(INT16_MIN); - const ElfW(Addr) max_value = static_cast(UINT16_MAX); - if ((min_value <= (sym_addr + addend - rel->r_offset)) && - ((sym_addr + addend - rel->r_offset) <= max_value)) { - *reinterpret_cast(reloc) = sym_addr + addend - rel->r_offset; - } else { - DL_ERR("0x%016llx out of range 0x%016llx to 0x%016llx", - sym_addr + addend - rel->r_offset, min_value, max_value); - return false; - } - } - break; - case R_AARCH64_COPY: /* * ET_EXEC is not supported so this should not happen.