x86 build breakage

Alan Modra amodra@gmail.com
Wed Sep 25 23:04:47 GMT 2024


On Wed, Sep 25, 2024 at 04:16:59PM +0200, Jan Beulich wrote:
> On 25.09.2024 14:28, Alan Modra wrote:
> > OK to apply the following?
> 
> Certainly.
> 
> > From 3ef6914d084c0f42404676e3fd7b8d7d34a33ec1 Mon Sep 17 00:00:00 2001
> > From: Alan Modra <amodra@gmail.com>
> > Date: Wed, 25 Sep 2024 21:32:03 +0930
> > Subject: Re: x86: Enable TLS relocation check only for ELF
> > 
> > Some configurations (eg. i386-bsd, i386-msdos) broke with commit
> > 9e0840deed38, due to the gotrel array being unused.  Fix that.
> 
> I can't help the impression that the array was unused for such targets also
> before x86_report_tls_error()'s uses appeared. I wonder what's different
> between then and now (yet likely not worthwhile to actually waste time on
> figuring out).

Yes, the error was there prior to the commit I blamed, but masked by
another error.  I've fixed the commit subject and message, writing:

    x86 TLS relocation checks
    
    Some configurations (eg. i386-bsd, i386-msdos) broke with the addition
    of the TLS relocation checking.  The "x86_elf_abi undeclared" error
    has been fixed, but "gotrel defined but not used" remains.  Fix that.
    Also invert the preprocessor test around lex_got to make it positive
    logic and remove the LEX_AT condition which is no longer necessary.
    (The only x86 config files defining LEX_AT also define TE_PE.)

> > Also invert the preprocessor test around lex_got to make it positive
> > logic and remove the LEX_AT condition which is no longer necessary.
> > (The only x86 config files defining LEX_AT also define TE_PE.)
> 
> Thanks for that - I don't recall how many times I sighed over that
> needlessly inverted logic.
> 
> There's another related use of LEX_AT also in x86_cons(). Curiously that
> #if condition doesn't fully match the other one. Can I maybe talk you into
> pruning that as well in the same commit?

Done.

-- 
Alan Modra


More information about the Binutils mailing list