Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Jan 14, 2025
1 parent 500416f commit f7624ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/output-chunks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1106,10 +1106,9 @@ void OutputSection<E>::scan_abs_relocations(Context<E> &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<E> &r : abs_rels)
if (r.kind == ABS_REL_BASEREL &&
!(r.isec->shdr().sh_flags & SHF_EXECINSTR) &&
r.isec->shdr().sh_addralign % sizeof(Word<E>) == 0 &&
r.offset % sizeof(Word<E>) == 0)
r.kind = ABS_REL_RELR;
Expand Down

0 comments on commit f7624ee

Please sign in to comment.