Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Nov 23, 2023
1 parent ef056d8 commit dc5b950
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elf/passes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1547,12 +1547,12 @@ void copy_chunks(Context<E> &ctx) {
// sections first. This is because REL-type relocation sections (as
// opposed to RELA-type) stores relocation addends to target sections.
tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {
if (chunk->shdr.sh_type != (E::is_rela ? SHT_RELA : SHT_REL))
if (chunk->shdr.sh_type != SHT_REL)
copy(*chunk);
});

tbb::parallel_for_each(ctx.chunks, [&](Chunk<E> *chunk) {
if (chunk->shdr.sh_type == (E::is_rela ? SHT_RELA : SHT_REL))
if (chunk->shdr.sh_type == SHT_REL)
copy(*chunk);
});

Expand Down

0 comments on commit dc5b950

Please sign in to comment.