From owner-freebsd-toolchain@freebsd.org Mon Jan 23 18:38:07 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23A92CBE02A for ; Mon, 23 Jan 2017 18:38:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2DC9F10; Mon, 23 Jan 2017 18:38:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::5436:f0fa:fd22:db1b] (unknown [IPv6:2001:7b8:3a7:0:5436:f0fa:fd22:db1b]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7F03D488CA; Mon, 23 Jan 2017 19:37:57 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_D5DE581D-BCE9-4194-84AB-17EF185B8585"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [clang/lld 4.0.0 arm64] link failure in sys/boot/efi/loader From: Dimitry Andric In-Reply-To: <20170123152751.szrkvk73a2wwp2ee@mutt-hardenedbsd> Date: Mon, 23 Jan 2017 19:37:47 +0100 Cc: FreeBSD Toolchain , Ed Maste Message-Id: References: <20170123152751.szrkvk73a2wwp2ee@mutt-hardenedbsd> To: Shawn Webb X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 18:38:07 -0000 --Apple-Mail=_D5DE581D-BCE9-4194-84AB-17EF185B8585 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 23 Jan 2017, at 16:27, Shawn Webb wrote: >=20 > Here's an interesting failure I'm seeing on HardenedBSD with clang = 4.0.0 > bits mixed in: >=20 > =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/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=3Dgnu99 = -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 --Apple-Mail=_D5DE581D-BCE9-4194-84AB-17EF185B8585 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAliGTYgACgkQsF6jCi4glqONMACg+2QI/7MJHOwshgfQGWAVpEf/ tnMAoJjWZluXlNKEL243tJ6eGUXfvzCj =BpmB -----END PGP SIGNATURE----- --Apple-Mail=_D5DE581D-BCE9-4194-84AB-17EF185B8585--