From 00964614d728e003475455078bfe3341102e819b Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 14 Jan 2021 00:22:32 +0900 Subject: [PATCH] temporary --- input_sections.cc | 12 ++---------- mold.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/input_sections.cc b/input_sections.cc index 8392ba11..a196d7e6 100644 --- a/input_sections.cc +++ b/input_sections.cc @@ -176,7 +176,6 @@ void InputSection::copy_buf() { : (sym.plt_idx == -1 ? sym.get_addr() : sym.get_plt_addr())) #define A (ref ? ref->addend : rel.r_addend) #define P (output_section->shdr.sh_addr + offset + rel.r_offset) -#define L sym.get_plt_addr() #define G (sym.get_got_addr() - out::got->shdr.sh_addr) #define GOT out::got->shdr.sh_addr @@ -205,9 +204,6 @@ void InputSection::copy_buf() { case R_GOTPCREL: write(G + GOT + A - P); break; - case R_PLT: - write(L + A - P); - break; case R_TLSGD: write(sym.get_tlsgd_addr() + A - P); break; @@ -248,7 +244,6 @@ void InputSection::copy_buf() { #undef S #undef A #undef P -#undef L #undef G #undef GOT } @@ -327,12 +322,9 @@ void InputSection::scan_relocations() { sym.flags |= NEEDS_GOT; break; case R_X86_64_PLT32: - if (sym.is_imported || sym.st_type == STT_GNU_IFUNC) { - rel_types[i] = R_PLT; + rel_types[i] = R_PC; + if (sym.is_imported || sym.st_type == STT_GNU_IFUNC) sym.flags |= NEEDS_PLT; - } else { - rel_types[i] = R_PC; - } break; case R_X86_64_TLSGD: if (rels[i + 1].r_type != R_X86_64_PLT32) diff --git a/mold.h b/mold.h index 10a15695..f37a4aa1 100644 --- a/mold.h +++ b/mold.h @@ -310,7 +310,6 @@ enum RelType : u8 { R_GOT, R_GOTPC, R_GOTPCREL, - R_PLT, R_TLSGD, R_TLSGD_RELAX_LE, R_TLSLD,