Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Jan 14, 2025
1 parent 7fc2a6e commit c6c12d4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/textrel2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ int main() {
}
EOF

$CC -B. -o $t/exe1 $t/a.o -pie
$QEMU $t/exe1 | grep -q 'Hello world'
$CC -o $t/exe1 $t/a.o -pie
$QEMU $t/exe1 | grep -q 'Hello world' || skip

$CC -B. -o $t/exe2 $t/a.o -pie
$QEMU $t/exe2 | grep -q 'Hello world'

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

$CC -B. -o $t/exe3 $t/a.o -pie -Wl,-z,pack-relative-relocs
$QEMU $t/exe3 | grep -q 'Hello world'
$CC -B. -o $t/exe4 $t/a.o -pie -Wl,-z,pack-relative-relocs
$QEMU $t/exe4 | grep -q 'Hello world'

0 comments on commit c6c12d4

Please sign in to comment.