Date: Mon, 23 Jan 2017 19:37:47 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Shawn Webb <shawn.webb@hardenedbsd.org> Cc: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Ed Maste <emaste@freebsd.org> Subject: Re: [clang/lld 4.0.0 arm64] link failure in sys/boot/efi/loader Message-ID: <FC9898D6-50A5-4545-8111-EDA328EF026F@FreeBSD.org> In-Reply-To: <20170123152751.szrkvk73a2wwp2ee@mutt-hardenedbsd> References: <20170123152751.szrkvk73a2wwp2ee@mutt-hardenedbsd>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On 23 Jan 2017, at 16:27, Shawn Webb <shawn.webb@hardenedbsd.org> wrote: > > Here's an interesting failure I'm seeing on HardenedBSD with clang 4.0.0 > bits mixed in: > > ==== BEGIN LOG ==== > cc -target aarch64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -B/usr -O2 -pipe -DHARDENEDBSD -DSKEIN_LOOP=111 -I/usr/src/sys/boot/efi/loader/../../arm64/libarm64 -msoft-float -mgeneral-regs-only -I/usr/src/sys/boot/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/usr/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include -I/usr/src/sys/boot/efi/loader/../../.. -I/usr/src/sys/boot/efi/loader/../../i386/libi386 -I/usr/src/sys/boot/efi/loader/../../zfs -I/usr/src/sys/boot/efi/loader/../../../cddl/boot/zfs -I/usr/src/sys/boot/efi/loader/../../../crypto/skein -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/../../ficl/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 -DLOADER_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/efi/loader/../../common -ffreestanding -Wformat -msoft-float -fshort-wchar -fPIC -g -DHAVE_LIBRESSL -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Qunused-arguments -Wl,-T/usr/src/sys/boot/efi/loader/arch/arm64/ldscript.arm64 -Wl,-Bsymbolic -shared -nostdlib -Wl,-z,relro -Wl,-z,now -o loader.sym.full autoload.o bootinfo.o conf.o copy.o devicename.o main.o self_reloc.o smbios.o vers.o zfs.o skein.o skein_block.o exec.o start.o cache.o boot.o commands.o console.o devopen.o interp.o interp_backslash.o interp_parse.o ls.o misc.o module.o panic.o load_elf64.o reloc_elf64.o disk.o part.o crc32.o bcache.o interp_forth.o /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a /usr/obj/usr/src/sys/boot/efi/loader/../libefi/libefi.a /usr/obj/usr/src/sys/boot/efi/loader/../../fdt/libfdt.a /usr/obj/usr/src/sys/boot/efi/loader/../../efi/fdt/libefi_fdt.a /usr/obj/usr/src/sys/boot/efi/loader/../../../../lib/libstand/libstand.a > /usr/bin/ld: error: Section has flags incompatible with others with the same name autoload.o:(.text) > /usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x0): can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(ficl.o) > /usr/bin/ld: error: /usr/src/sys/boot/ficl/ficl.c:(.rodata+0x8): can't create dynamic relocation R_AARCH64_ABS64 against local symbol in readonly segment defined in /usr/obj/usr/src/sys/boot/efi/loader/../../ficl/libficl.a(ficl.o) Not an AArch64 expert here, but if I understand correctly AArch64's world must be linked with a ports version of binutils? Ed, any clues about this? Then again, this could also point to some real problem with the section flags. -Dimitry [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAliGTYgACgkQsF6jCi4glqONMACg+2QI/7MJHOwshgfQGWAVpEf/ tnMAoJjWZluXlNKEL243tJ6eGUXfvzCj =BpmB -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FC9898D6-50A5-4545-8111-EDA328EF026F>
