File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
. $( dirname $0 ) /common.inc
3
3
4
- cat << EOF | $GCC -c -o $t /a.o -ffunction-sections -fdata-sections -xc -
4
+ # GCC 11 or older uses R_390_PLT32DBL to take an address of a function
5
+ # instead of R_390_PC32DBL
6
+ if [ $MACHINE = s390x ]; then
7
+ echo ' void *foo() { return foo; }' | $CC -c -o $t /a.o -xc -
8
+ readelf -r $t /a.o | grep -q R_390_PLT32DBL && skip
9
+ fi
10
+
11
+ cat << EOF | $CC -c -o $t /a.o -ffunction-sections -fdata-sections -xc -
5
12
int bar() {
6
13
return 5;
7
14
}
34
41
$CC -B. -o $t /exe1 -Wl,-icf=safe $t /a.o $t /b.o
35
42
$QEMU $t /exe1 | grep -q ' ^0 0$'
36
43
37
- cat << EOF | $GCC -c -o $t /c.o -ffunction-sections -fdata-sections -xc -
44
+ cat << EOF | $CC -c -o $t /c.o -ffunction-sections -fdata-sections -xc -
38
45
int foo1();
39
46
int foo2();
40
47
int foo3();
You can’t perform that action at this time.
0 commit comments