Skip to content

2.40.4 failing multiple archs on AlpineLinux #1536

@bl4ckb0ne

Description

@bl4ckb0ne

Hi, during our upgrade of mold to 2.40.4 we encountered various test failure on almost every of our supported arch other than s390x. I have attached the logs for each test fail. Some require -fPIC to be enabled, is this something that we should fix in our package build?

aarch64-arch-aarch64-long-thunk
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/arch-aarch64-long-thunk.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z aarch64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/aarch64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/arch-aarch64-long-thunk.sh .sh
++ testname=arch-aarch64-long-thunk
++ t=out/test/aarch64/arch-aarch64-long-thunk
++ mkdir -p out/test/aarch64/arch-aarch64-long-thunk
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=desc
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing arch-aarch64-long-thunk ... '
Testing arch-aarch64-long-thunk ... ++ set -o pipefail
++ set -x
+ cat
+ cat
+ cc -c -o out/test/aarch64/arch-aarch64-long-thunk/c.o out/test/aarch64/arch-aarch64-long-thunk/a.c
+ cc -c -o out/test/aarch64/arch-aarch64-long-thunk/d.o out/test/aarch64/arch-aarch64-long-thunk/b.c
+ cc -B. -o out/test/aarch64/arch-aarch64-long-thunk/exe1 out/test/aarch64/arch-aarch64-long-thunk/c.o out/test/aarch64/arch-aarch64-long-thunk/d.o -Wl,--section-start=.low=0x10000000,--section-start=.high=0x100000000
+ out/test/aarch64/arch-aarch64-long-thunk/exe1
+ grep 'main fn1 fn3 fn2 fn4'
 main fn1 fn3 fn2 fn4
+ cc -B. -o out/test/aarch64/arch-aarch64-long-thunk/exe2 out/test/aarch64/arch-aarch64-long-thunk/c.o out/test/aarch64/arch-aarch64-long-thunk/d.o -Wl,--section-start=.high=0x10000000,--section-start=.low=0x100000000
+ out/test/aarch64/arch-aarch64-long-thunk/exe2
+ grep 'main fn1 fn3 fn2 fn4'
 main fn1 fn3 fn2 fn4
+ cc -c -o out/test/aarch64/arch-aarch64-long-thunk/e.o out/test/aarch64/arch-aarch64-long-thunk/a.c -fno-PIC -mcmodel=large
+ cc -c -o out/test/aarch64/arch-aarch64-long-thunk/f.o out/test/aarch64/arch-aarch64-long-thunk/b.c -fno-PIC -mcmodel=large
+ cc -B. -o out/test/aarch64/arch-aarch64-long-thunk/exe3 out/test/aarch64/arch-aarch64-long-thunk/e.o out/test/aarch64/arch-aarch64-long-thunk/f.o -pie -Wl,--section-start=.low=0x10000000,--section-start=.high=0x400000000
mold: error: /usr/lib/Scrt1.o:(.text._start_c): relocation R_AARCH64_ADR_GOT_PAGE against _init out of range: 16911433728 is not in [-4294967296, 4294967296)
collect2: error: ld returned 1 exit status
++ on_error 45
++ code=1
++ echo 'command failed: 45: $CC -B. -o $t/exe3 $t/e.o $t/f.o -pie -Wl,--section-start=.low=0x10000000,--section-start=.high=0x400000000'
command failed: 45: $CC -B. -o $t/exe3 $t/e.o $t/f.o -pie -Wl,--section-start=.low=0x10000000,--section-start=.high=0x400000000
++ trap - EXIT
++ exit 1
aarch64-z-dynamic-undefined-weak2
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/z-dynamic-undefined-weak2.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z aarch64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/aarch64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/z-dynamic-undefined-weak2.sh .sh
++ testname=z-dynamic-undefined-weak2
++ t=out/test/aarch64/z-dynamic-undefined-weak2
++ mkdir -p out/test/aarch64/z-dynamic-undefined-weak2
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=desc
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing z-dynamic-undefined-weak2 ... '
Testing z-dynamic-undefined-weak2 ... ++ set -o pipefail
++ set -x
+ cat
+ cc -o out/test/aarch64/z-dynamic-undefined-weak2/a.o -c -xc - -fno-PIE
+ cc -B. -o out/test/aarch64/z-dynamic-undefined-weak2/exe out/test/aarch64/z-dynamic-undefined-weak2/a.o -no-pie -Wl,-z,dynamic-undefined-weak
+ + out/test/aarch64/z-dynamic-undefined-weak2/exe
grep -F '(nil)'
++ on_error 11
++ code=1
++ echo 'command failed: 11: grep -F '\''(nil)'\'''
command failed: 11: grep -F '(nil)'
++ trap - EXIT
++ exit 1
(armhf) arm-omagic
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z arm ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/arm
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh .sh
++ testname=omagic
++ t=out/test/arm/omagic
++ mkdir -p out/test/arm/omagic
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing omagic ... '
Testing omagic ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -c -o out/test/arm/omagic/a.o -xc - -fno-PIC
+ cc -B. out/test/arm/omagic/a.o -o out/test/arm/omagic/exe -static -Wl,--omagic
mold: error: out/test/arm/omagic/a.o:(.text): relocation at offset 0x1c against symbol `.rodata' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 15
++ code=1
++ echo 'command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic'
command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic
++ trap - EXIT
++ exit 1
(armv7) arm-omagic
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z arm ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/arm
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh .sh
++ testname=omagic
++ t=out/test/arm/omagic
++ mkdir -p out/test/arm/omagic
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing omagic ... '
Testing omagic ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -c -o out/test/arm/omagic/a.o -xc - -fno-PIC
+ cc -B. out/test/arm/omagic/a.o -o out/test/arm/omagic/exe -static -Wl,--omagic
mold: error: out/test/arm/omagic/a.o:(.text): R_ARM_THM_MOVW_ABS_NC relocation at offset 0x4 against symbol `.LC0' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 15
++ code=1
++ echo 'command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic'
command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic
++ trap - EXIT
++ exit 1
loongarch64-z-dynamic-undefined-weak2
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/z-dynamic-undefined-weak2.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z loongarch64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/loongarch64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/z-dynamic-undefined-weak2.sh .sh
++ testname=z-dynamic-undefined-weak2
++ t=out/test/loongarch64/z-dynamic-undefined-weak2
++ mkdir -p out/test/loongarch64/z-dynamic-undefined-weak2
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=desc
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing z-dynamic-undefined-weak2 ... '
Testing z-dynamic-undefined-weak2 ... ++ set -o pipefail
++ set -x
+ cat
+ cc -o out/test/loongarch64/z-dynamic-undefined-weak2/a.o -c -xc - -fno-PIE
+ cc -B. -o out/test/loongarch64/z-dynamic-undefined-weak2/exe out/test/loongarch64/z-dynamic-undefined-weak2/a.o -no-pie -Wl,-z,dynamic-undefined-weak
+ out/test/loongarch64/z-dynamic-undefined-weak2/exe
+ grep -F '(nil)'
++ on_error 11
++ code=1
++ echo 'command failed: 11: grep -F '\''(nil)'\'''
command failed: 11: grep -F '(nil)'
++ trap - EXIT
++ exit 1
ppc64le-z-dynamic-undefined-weak2
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/z-dynamic-undefined-weak2.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z ppc64le ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/ppc64le
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/z-dynamic-undefined-weak2.sh .sh
++ testname=z-dynamic-undefined-weak2
++ t=out/test/ppc64le/z-dynamic-undefined-weak2
++ mkdir -p out/test/ppc64le/z-dynamic-undefined-weak2
++ case $MACHINE in
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing z-dynamic-undefined-weak2 ... '
Testing z-dynamic-undefined-weak2 ... ++ set -o pipefail
++ set -x
+ cat
+ cc -o out/test/ppc64le/z-dynamic-undefined-weak2/a.o -c -xc - -fno-PIE
+ cc -B. -o out/test/ppc64le/z-dynamic-undefined-weak2/exe out/test/ppc64le/z-dynamic-undefined-weak2/a.o -no-pie -Wl,-z,dynamic-undefined-weak
+ out/test/ppc64le/z-dynamic-undefined-weak2/exe
+ grep -F '(nil)'
++ on_error 11
++ code=1
++ echo 'command failed: 11: grep -F '\''(nil)'\'''
command failed: 11: grep -F '(nil)'
++ trap - EXIT
++ exit 1
riscv64-omagic
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z riscv64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/riscv64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh .sh
++ testname=omagic
++ t=out/test/riscv64/omagic
++ mkdir -p out/test/riscv64/omagic
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=desc
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing omagic ... '
Testing omagic ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -c -o out/test/riscv64/omagic/a.o -xc - -fno-PIC
+ cc -B. out/test/riscv64/omagic/a.o -o out/test/riscv64/omagic/exe -static -Wl,--omagic
mold: error: out/test/riscv64/omagic/a.o:(.text): R_RISCV_HI20 relocation at offset 0x8 against symbol `.LC0' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 15
++ code=1
++ echo 'command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic'
command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic
++ trap - EXIT
++ exit 1
i686-omagic
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z i686 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/i686
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh .sh
++ testname=omagic
++ t=out/test/i686/omagic
++ mkdir -p out/test/i686/omagic
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing omagic ... '
Testing omagic ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -c -o out/test/i686/omagic/a.o -xc - -fno-PIC
+ cc -B. out/test/i686/omagic/a.o -o out/test/i686/omagic/exe -static -Wl,--omagic
mold: error: out/test/i686/omagic/a.o:(.text): relocation at offset 0x15 against symbol `.rodata' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 15
++ code=1
++ echo 'command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic'
command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic
++ trap - EXIT
++ exit 1
x86_64-arch-x86_64-mergeable-records
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/arch-x86_64-mergeable-records.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z x86_64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/x86_64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/arch-x86_64-mergeable-records.sh .sh
++ testname=arch-x86_64-mergeable-records
++ t=out/test/x86_64/arch-x86_64-mergeable-records
++ mkdir -p out/test/x86_64/arch-x86_64-mergeable-records
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing arch-x86_64-mergeable-records ... '
Testing arch-x86_64-mergeable-records ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -o out/test/x86_64/arch-x86_64-mergeable-records/a.o -c -x assembler -
+ cc -B. -static -o out/test/x86_64/arch-x86_64-mergeable-records/exe out/test/x86_64/arch-x86_64-mergeable-records/a.o
mold: error: out/test/x86_64/arch-x86_64-mergeable-records/a.o:(.text): R_X86_64_32S relocation at offset 0x7 against symbol `<fragment>' can not be used; recompile with -fPIC
mold: error: out/test/x86_64/arch-x86_64-mergeable-records/a.o:(.text): R_X86_64_32S relocation at offset 0x16 against symbol `.L.str1' can not be used; recompile with -fPIC
mold: error: out/test/x86_64/arch-x86_64-mergeable-records/a.o:(.text): R_X86_64_32S relocation at offset 0x25 against symbol `str2' can not be used; recompile with -fPIC
mold: error: out/test/x86_64/arch-x86_64-mergeable-records/a.o:(.text): R_X86_64_32S relocation at offset 0x34 against symbol `.L.str3' can not be used; recompile with -fPIC
mold: error: out/test/x86_64/arch-x86_64-mergeable-records/a.o:(.text): R_X86_64_32S relocation at offset 0x43 against symbol `<fragment>' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 47
++ code=1
++ echo 'command failed: 47: $CC -B. -static -o $t/exe $t/a.o'
command failed: 47: $CC -B. -static -o $t/exe $t/a.o
++ trap - EXIT
++ exit 1
x86_64-arch-x86_64-mergeable-strings
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/arch-x86_64-mergeable-strings.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z x86_64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/x86_64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/arch-x86_64-mergeable-strings.sh .sh
++ testname=arch-x86_64-mergeable-strings
++ t=out/test/x86_64/arch-x86_64-mergeable-strings
++ mkdir -p out/test/x86_64/arch-x86_64-mergeable-strings
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing arch-x86_64-mergeable-strings ... '
Testing arch-x86_64-mergeable-strings ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -o out/test/x86_64/arch-x86_64-mergeable-strings/a.o -c -x assembler -
+ cc -B. -static -o out/test/x86_64/arch-x86_64-mergeable-strings/exe out/test/x86_64/arch-x86_64-mergeable-strings/a.o
mold: error: out/test/x86_64/arch-x86_64-mergeable-strings/a.o:(.text): R_X86_64_32S relocation at offset 0x7 against symbol `.L.str' can not be used; recompile with -fPIC
mold: error: out/test/x86_64/arch-x86_64-mergeable-strings/a.o:(.text): R_X86_64_32S relocation at offset 0x16 against symbol `<fragment>' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 29
++ code=1
++ echo 'command failed: 29: $CC -B. -static -o $t/exe $t/a.o'
command failed: 29: $CC -B. -static -o $t/exe $t/a.o
++ trap - EXIT
++ exit 1
x86_64-mcmodel-large
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/mcmodel-large.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z x86_64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/x86_64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/mcmodel-large.sh .sh
++ testname=mcmodel-large
++ t=out/test/x86_64/mcmodel-large
++ mkdir -p out/test/x86_64/mcmodel-large
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing mcmodel-large ... '
Testing mcmodel-large ... ++ set -o pipefail
++ set -x
+ test_cflags -static -mcmodel=large
+ echo 'int main() {}'
+ cc -B. -static -mcmodel=large -o /dev/null -xc -
+ cat
+ cc -o out/test/x86_64/mcmodel-large/a.o -c -xc - -fno-PIC -mcmodel=large
+ cc -B. -o out/test/x86_64/mcmodel-large/exe out/test/x86_64/mcmodel-large/a.o -static
mold: error: out/test/x86_64/mcmodel-large/a.o:(.text): relocation at offset 0x6 against symbol `.rodata' can not be used; recompile with -fPIC
mold: error: out/test/x86_64/mcmodel-large/a.o:(.text): relocation at offset 0x13 against symbol `puts' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 13
++ code=1
++ echo 'command failed: 13: $CC -B. -o $t/exe $t/a.o -static'
command failed: 13: $CC -B. -o $t/exe $t/a.o -static
++ trap - EXIT
++ exit 1
x86_64-omagic
++ dirname /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh
+ . /builds/alpine/aports/community/mold/src/mold-2.40.4/test/common.inc
++ export LC_ALL=C
++ LC_ALL=C
++ '[' -z x86_64 ']'
++ '[' -z '' ']'
++ TESTDIR=out/test/x86_64
++ CC=cc
++ CXX=c++
++ GCC=gcc
++ GXX=g++
++ OBJDUMP=objdump
++ OBJCOPY=objcopy
++ STRIP=strip
++ QEMU=
+++ basename /builds/alpine/aports/community/mold/src/mold-2.40.4/test/omagic.sh .sh
++ testname=omagic
++ t=out/test/x86_64/omagic
++ mkdir -p out/test/x86_64/omagic
++ case $MACHINE in
++ tlsdesc_opt=-mtls-dialect=gnu2
+++ uname
++ '[' Linux = FreeBSD ']'
++ trap 'on_error $LINENO' ERR
++ trap on_exit EXIT
++ echo -n 'Testing omagic ... '
Testing omagic ... ++ set -o pipefail
++ set -x
+ test_cflags -static
+ echo 'int main() {}'
+ cc -B. -static -o /dev/null -xc -
+ cat
+ cc -c -o out/test/x86_64/omagic/a.o -xc - -fno-PIC
+ cc -B. out/test/x86_64/omagic/a.o -o out/test/x86_64/omagic/exe -static -Wl,--omagic
mold: error: out/test/x86_64/omagic/a.o:(.text): R_X86_64_32 relocation at offset 0x5 against symbol `.rodata' can not be used; recompile with -fPIC
collect2: error: ld returned 1 exit status
++ on_error 15
++ code=1
++ echo 'command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic'
command failed: 15: $CC -B. $t/a.o -o $t/exe -static -Wl,--omagic
++ trap - EXIT
++ exit 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions