Date: Tue, 21 Dec 2021 14:57:27 -0500 From: Ed Maste <emaste@freebsd.org> To: Dimitry Andric <dim@freebsd.org> Cc: Jan Beich <jbeich@freebsd.org>, "freebsd-toolchain@FreeBSD.org" <toolchain@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org> Subject: Re: /stable/12 future Message-ID: <CAPyFy2Aw8nF1g4gQjriCzBCqWDuSHCV_6%2BeN0-_0uYCgMyMGrw@mail.gmail.com> In-Reply-To: <B267FFAC-1672-44E2-9474-315E61CE5E0A@FreeBSD.org> References: <ee6m-nakd-wny@FreeBSD.org> <5CA8FE25-F46A-4902-9FFC-266347C88021@FreeBSD.org> <B267FFAC-1672-44E2-9474-315E61CE5E0A@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Dec 2021 at 15:54, Dimitry Andric <dim@freebsd.org> wrote: > > The obvious solution would seem to be to switch to lld as the default > linker, however that also runs into a snag. Since lld uses the blx > instruction for interworking, it prints a warning "lld uses blx > instruction, no object with architecture supporting feature detected". > > And because we link with the --fatal-warnings option, this stops> buildworld dead in its tracks. Obviously, this warning could be ignored > (by removing --fatal-warnings, or patching it out), but I think this > might result in issues when the actual binaries are run. I believe this warning is emitted in any environment that a blx instruction might be necessary, not that the instruction is actually used. >From ELF/InputFiles.cpp: // The ARM support in lld makes some use of instructions that are not available // on all ARM architectures. Namely: // - Use of BLX instruction for interworking between ARM and Thumb state. // - Use of the extended Thumb branch encoding in relocation. // - Use of the MOVT/MOVW instructions in Thumb Thunks. I wonder if we could remove the warning from ELF/Driver.cpp in the case that config->armHasBlx == false, and replace it with an error in ELF/Arch/ARM.cpp if we actually need to emit a blx instruction?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2Aw8nF1g4gQjriCzBCqWDuSHCV_6%2BeN0-_0uYCgMyMGrw>