Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Feb 5, 2025
1 parent 4ed6f48 commit 359e513
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/output-chunks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1426,12 +1426,12 @@ void GotSection<E>::copy_buf(Context<E> &ctx) {
//
// ARM32 employs the inverted layout for some reason, so an
// addend is applied to the first slot.
bool inverted = false;
bool is_tlsdesc = false;
if constexpr (supports_tlsdesc<E> && !is_arm32<E>)
inverted = (ent.r_type == E::R_TLSDESC);
is_tlsdesc = (ent.r_type == E::R_TLSDESC);

if (ctx.arg.apply_dynamic_relocs) {
if (inverted)
if (is_tlsdesc)
buf[ent.idx + 1] = ent.val;
else
buf[ent.idx] = ent.val;
Expand Down

0 comments on commit 359e513

Please sign in to comment.