-
-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emit DT_AARCH64_VARIANT_PCS if required
Fixes #1115
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
. $(dirname $0)/common.inc | ||
|
||
[ $MACHINE = aarch64 ] || skip | ||
|
||
cat <<EOF | $CC -c -o $t/a.o -fPIC -xassembler - | ||
.global foo | ||
.type foo, %function | ||
.variant_pcs foo | ||
foo: | ||
ret | ||
EOF | ||
|
||
$CC -B. -shared -o $t/b.so $t/a.o | ||
readelf -W --dyn-syms $t/b.so | grep -Eq '\[VARIANT_PCS\].* foo$' | ||
|
||
cat <<EOF | $CC -c -o $t/c.o -xc - | ||
void foo(); | ||
int main() { foo(); } | ||
EOF | ||
|
||
$CC -B. -o $t/exe $t/c.o $t/b.so | ||
readelf -W --dynamic $t/exe | grep -q AARCH64_VARIANT_PCS |