Skip to content

Commit

Permalink
Fix buildbot
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Sep 14, 2024
1 parent 431fc39 commit 8d5b753
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mold.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ enum AbsRelKind {
template <typename E>
struct AbsRel {
InputSection<E> *isec = nullptr;
i64 offset = 0;
u64 offset = 0;
Symbol<E> *sym = nullptr;
i64 addend = 0;
AbsRelKind kind = ABS_REL_NONE;
Expand Down
4 changes: 2 additions & 2 deletions src/output-chunks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,8 @@ void OutputSection<E>::scan_abs_relocations(Context<E> &ctx) {
InputSection<E> *isec = members[i];
for (const ElfRel<E> &r : isec->get_rels(ctx))
if (r.r_type == E::R_ABS)
shards[i].emplace_back(isec, r.r_offset, isec->file.symbols[r.r_sym],
get_addend(*isec, r));
shards[i].push_back(AbsRel<E>{isec, r.r_offset, isec->file.symbols[r.r_sym],
get_addend(*isec, r)});
});

abs_rels = flatten(shards);
Expand Down
1 change: 1 addition & 0 deletions test/z-pack-relative-relocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ int main() {
EOF

$CC -o $t/exe1 $t/a.o -pie -Wl,-z,pack-relative-relocs 2> /dev/null || skip
readelf -WS $t/exe1 | grep -Fq .relr.dyn || skip
$QEMU $t/exe1 2> /dev/null | grep -q Hello || skip

$CC -B. -o $t/exe2 $t/a.o -pie -Wl,-z,pack-relative-relocs
Expand Down

0 comments on commit 8d5b753

Please sign in to comment.