Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2017 10:27:51 -0500
From:      Shawn Webb <shawn.webb@hardenedbsd.org>
To:        freebsd-toolchain@freebsd.org
Subject:   [clang/lld 4.0.0 arm64] link failure in sys/boot/efi/loader
Message-ID:  <20170123152751.szrkvk73a2wwp2ee@mutt-hardenedbsd>

next in thread | raw e-mail | index | archive | help

--quuuzbot47bv4pk2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Here's an interesting failure I'm seeing on HardenedBSD with clang 4.0.0
bits mixed in:

=3D=3D=3D=3D BEGIN LOG =3D=3D=3D=3D
cc -target aarch64-unknown-freebsd12.0 --sysroot=3D/usr/obj/usr/src/tmp -B/=
usr -O2 -pipe -DHARDENEDBSD -DSKEIN_LOOP=3D111 -I/usr/src/sys/boot/efi/load=
er/../../arm64/libarm64 -msoft-float -mgeneral-regs-only -I/usr/src/sys/boo=
t/efi/loader -I/usr/src/sys/boot/efi/loader/arch/arm64 -I/usr/src/sys/boot/=
efi/loader/../include -I/usr/src/sys/boot/efi/loader/../include/arm64 -I/us=
r/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include -I/usr/src/sy=
s/boot/efi/loader/../../.. -I/usr/src/sys/boot/efi/loader/../../i386/libi38=
6 -I/usr/src/sys/boot/efi/loader/../../zfs -I/usr/src/sys/boot/efi/loader/.=
=2E/../../cddl/boot/zfs -I/usr/src/sys/boot/efi/loader/../../../crypto/skei=
n -DEFI_ZFS_BOOT -DNO_PCI -DEFI -DSMBIOS_SERIAL_NUMBERS -DBOOT_FORTH -I/usr=
/src/sys/boot/efi/loader/../../ficl -I/usr/src/sys/boot/efi/loader/../../fi=
cl/aarch64 -I/usr/src/sys/boot/efi/loader/../../fdt -I/usr/obj/usr/src/sys/=
boot/efi/loader/../../fdt -DLOADER_FDT_SUPPORT -DLOADER_DISK_SUPPORT -DLOAD=
ER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -I/usr/src/sys/boot/ficl -I/usr/src/sys=
/boot/ficl/aarch64 -I/usr/src/sys/boot/ficl/../common -I/usr/src/sys/boot/e=
fi/loader/../../common -ffreestanding -Wformat -msoft-float -fshort-wchar -=
fPIC -g -DHAVE_LIBRESSL -std=3Dgnu99 -Wsystem-headers -Werror -Wall -Wno-fo=
rmat-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes =
-Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-s=
tring-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-un=
used-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-convers=
ion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-argume=
nts  -Wl,-T/usr/src/sys/boot/efi/loader/arch/arm64/ldscript.arm64 -Wl,-Bsym=
bolic -shared -nostdlib -Wl,-z,relro -Wl,-z,now -o loader.sym.full autoload=
=2Eo bootinfo.o conf.o copy.o devicename.o main.o self_reloc.o smbios.o ver=
s.o zfs.o skein.o skein_block.o exec.o start.o cache.o boot.o commands.o co=
nsole.o devopen.o interp.o interp_backslash.o interp_parse.o ls.o misc.o mo=
dule.o panic.o load_elf64.o reloc_elf64.o disk.o part.o crc32.o bcache.o in=
terp_forth.o  /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a /us=
r/obj/usr/src/sys/boot/efi/loader/../libefi/libefi.a /usr/obj/usr/src/sys/b=
oot/efi/loader/../../fdt/libfdt.a /usr/obj/usr/src/sys/boot/efi/loader/../.=
=2E/efi/fdt/libefi_fdt.a /usr/obj/usr/src/sys/boot/efi/loader/../../../../l=
ib/libstand/libstand.a
/usr/bin/ld: error: Section has flags incompatible with others with the sam=
e name autoload.o:(.text)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x0): can't crea=
te dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segm=
ent defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(fi=
cl.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x8): can't crea=
te dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segm=
ent defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(fi=
cl.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x10): can't cre=
ate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly seg=
ment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(f=
icl.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x18): can't cre=
ate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly seg=
ment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(f=
icl.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x20): can't cre=
ate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly seg=
ment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(f=
icl.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x28): can't cre=
ate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly seg=
ment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(f=
icl.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x0): can't cre=
ate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly seg=
ment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(w=
ords.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x8): can't cre=
ate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly seg=
ment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(w=
ords.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x10): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x18): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x20): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x28): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x30): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x38): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x40): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x48): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x50): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x58): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: /usr/src/sys/boot/ficl/words.c:(.rodata+0x60): can't cr=
eate dynamic relocation R_AARCH64_ABS64 against local symbol in readonly se=
gment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(=
words.o)
/usr/bin/ld: error: too many errors emitted, stopping now (use -error-limit=
=3D0 to see all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
=3D=3D=3D=3D END LOG =3D=3D=3D=3D

--=20
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE

--quuuzbot47bv4pk2
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAliGIPQACgkQaoRlj1JF
bu6PgRAAhToF/01z0ZgKtvPYToCAZ6zdVQAVEIinxzTuoLSIPhbbZmaklOHmB2CI
OGi5eafIFqcQ8XfNARIevytXkMcVSrXWxipt9gkPcYof/z8HmIdMLVPsyk6SsCPZ
Zdt+oT7rVzrGCUO5aBuDfF3CdTKrH0IrHbCVX/kZN6eeibSko4tjBX8Dcw/p10pM
YweEiDgXdeMcurucPzVKg6PLSvuDj6UvFIc165xot91tPn73NRovxKvTlDmnavOU
GYa3vKQSGS4JyUXZg3mnkmEnAW+Iypxhf9k3eEJFFHOkhHdq9YWP1YnNZ0UPFZba
ZmM62TG9+snae8bjHb50QxEMGPPQ9PqjMiYsKCEnVlWSsmp6hdgOiUMR+GqVyP9H
FgVXVVw1YLRMfFIxljTYcQOK2GMOm4nFM7HAa5aEOSyQICRP3hp5i81Crcw4pglW
d99YncdoO7ssO3DFamj9EeWWu8DlhKo9JFd1JvBrqc4L57ZEIqGKXSRgqks9ZUhS
YVvHoHCwu5tIzSdBCzM4xj5ZfVmcsTL+x53SnpfOxR/M9/QOZ9e4kyLPzXiKdUcQ
3C08mVg7mmPY+SyB7nNK6l3EHZu8olWdp3+/+ATYUY02JMnjFI1rVlh0pWNsJzP+
UEr+IhU+xx3pqat9RpyuzwIXNzVgzBnWxggzL3Z/WwPOelj8JZM=
=4sB+
-----END PGP SIGNATURE-----

--quuuzbot47bv4pk2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170123152751.szrkvk73a2wwp2ee>