From f7624ee1f9cc17208d8e156a1b2ed5d2efc28f0b Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 15 Jan 2025 08:15:35 +0900 Subject: [PATCH] Simplify --- src/output-chunks.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/output-chunks.cc b/src/output-chunks.cc index d93d4e7577..6b68f6d43b 100644 --- a/src/output-chunks.cc +++ b/src/output-chunks.cc @@ -1106,10 +1106,9 @@ void OutputSection::scan_abs_relocations(Context &ctx) { // If --pack-dyn-relocs=relr is enabled, base relocations are put into // .relr.dyn. - if (ctx.arg.pack_dyn_relocs_relr) + if (ctx.arg.pack_dyn_relocs_relr && !(this->shdr.sh_flags & SHF_EXECINSTR)) for (AbsRel &r : abs_rels) if (r.kind == ABS_REL_BASEREL && - !(r.isec->shdr().sh_flags & SHF_EXECINSTR) && r.isec->shdr().sh_addralign % sizeof(Word) == 0 && r.offset % sizeof(Word) == 0) r.kind = ABS_REL_RELR;