Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709001 > unrolled thread

New assembler warnings with binutils 2.29

Started byLaura Abbott <labbott@redhat.com>
First post2017-08-10 22:20 +0200
Last post2017-08-11 11:30 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  New assembler warnings with binutils 2.29 Laura Abbott <labbott@redhat.com> - 2017-08-10 22:20 +0200
    Re: New assembler warnings with binutils 2.29 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-11 11:30 +0200
      Re: New assembler warnings with binutils 2.29 Arnd Bergmann <arnd@arndb.de> - 2017-08-11 11:40 +0200
        Re: New assembler warnings with binutils 2.29 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-08-11 12:20 +0200
    Re: New assembler warnings with binutils 2.29 Catalin Marinas <catalin.marinas@arm.com> - 2017-08-11 11:30 +0200

#1709001 — New assembler warnings with binutils 2.29

FromLaura Abbott <labbott@redhat.com>
Date2017-08-10 22:20 +0200
SubjectNew assembler warnings with binutils 2.29
Message-ID<ud25X-2iy-15@gated-at.bofh.it>
Fedora rawhide recently upgraded to binutils 2.29 and this seems
to produce new warnings:

./arch/arm64/include/asm/assembler.h: Assembler messages:
./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr'

This is

/*
 * Register aliases.
 */
lr      .req    x30             // link register

https://kojipkgs.fedoraproject.org//packages/kernel/4.13.0/0.rc2.git2.1.fc27/data/logs/aarch64/build.log
has an example log. As far as I can tell this doesn't affect anything at runtime.

Any ideas?

Thanks,
Laura

[toc] | [next] | [standalone]


#1709401

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2017-08-11 11:30 +0200
Message-ID<udeqt-1IZ-5@gated-at.bofh.it>
In reply to#1709001
On 11 August 2017 at 10:22, Catalin Marinas <catalin.marinas@arm.com> wrote:
> On Thu, Aug 10, 2017 at 01:13:22PM -0700, Laura Abbott wrote:
>> Fedora rawhide recently upgraded to binutils 2.29 and this seems
>> to produce new warnings:
>>
>> ./arch/arm64/include/asm/assembler.h: Assembler messages:
>> ./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr'
>>
>> This is
>>
>> /*
>>  * Register aliases.
>>  */
>> lr      .req    x30             // link register
>
> Strange, does gas now think 'lr' is a general purpose register (aliased
> to x30)? It never was and IIRC the toolchain people many years ago
> refused to add it, hence the alias above in the kernel. I wonder if they
> added 'fp' as well...
>
> We could remove the alias and replace all 'lr' instances with 'x30'
> throughout the kernel (no too many) or we add some #ifdef around the
> above based on the binutils version.
>

This is annoying. Replacing x30 with lr achieves the opposite of the
intent of the binutils change. And using #ifdefs is inaccurate,
because you can't really test the binutils version only the GCC
version, and those are not tightly coupled.

Can you .unreq it?

[toc] | [prev] | [next] | [standalone]


#1709409

FromArnd Bergmann <arnd@arndb.de>
Date2017-08-11 11:40 +0200
Message-ID<udeAa-1Md-13@gated-at.bofh.it>
In reply to#1709401
On Fri, Aug 11, 2017 at 11:26 AM, Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
> On 11 August 2017 at 10:22, Catalin Marinas <catalin.marinas@arm.com> wrote:
>> On Thu, Aug 10, 2017 at 01:13:22PM -0700, Laura Abbott wrote:
>>> Fedora rawhide recently upgraded to binutils 2.29 and this seems
>>> to produce new warnings:
>>>
>>> ./arch/arm64/include/asm/assembler.h: Assembler messages:
>>> ./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr'
>>>
>>> This is
>>>
>>> /*
>>>  * Register aliases.
>>>  */
>>> lr      .req    x30             // link register
>>
>> Strange, does gas now think 'lr' is a general purpose register (aliased
>> to x30)? It never was and IIRC the toolchain people many years ago
>> refused to add it, hence the alias above in the kernel. I wonder if they
>> added 'fp' as well...
>>
>> We could remove the alias and replace all 'lr' instances with 'x30'
>> throughout the kernel (no too many) or we add some #ifdef around the
>> above based on the binutils version.
>>
>
> This is annoying. Replacing x30 with lr achieves the opposite of the
> intent of the binutils change. And using #ifdefs is inaccurate,
> because you can't really test the binutils version only the GCC
> version, and those are not tightly coupled.
>
> Can you .unreq it?

adding the author of the change to cc

https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=62e20ed45e3da5f3ba695e4ee109317668180fe6

There probably was some reasoning behind the change and an
intended method for using it.

    Arnd

[toc] | [prev] | [next] | [standalone]


#1709442

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2017-08-11 12:20 +0200
Message-ID<udfcR-2eO-3@gated-at.bofh.it>
In reply to#1709409
On 11 August 2017 at 10:34, Arnd Bergmann <arnd@arndb.de> wrote:
> On Fri, Aug 11, 2017 at 11:26 AM, Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
>> On 11 August 2017 at 10:22, Catalin Marinas <catalin.marinas@arm.com> wrote:
>>> On Thu, Aug 10, 2017 at 01:13:22PM -0700, Laura Abbott wrote:
>>>> Fedora rawhide recently upgraded to binutils 2.29 and this seems
>>>> to produce new warnings:
>>>>
>>>> ./arch/arm64/include/asm/assembler.h: Assembler messages:
>>>> ./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr'
>>>>
>>>> This is
>>>>
>>>> /*
>>>>  * Register aliases.
>>>>  */
>>>> lr      .req    x30             // link register
>>>
>>> Strange, does gas now think 'lr' is a general purpose register (aliased
>>> to x30)? It never was and IIRC the toolchain people many years ago
>>> refused to add it, hence the alias above in the kernel. I wonder if they
>>> added 'fp' as well...
>>>
>>> We could remove the alias and replace all 'lr' instances with 'x30'
>>> throughout the kernel (no too many) or we add some #ifdef around the
>>> above based on the binutils version.
>>>
>>
>> This is annoying. Replacing x30 with lr achieves the opposite of the

Of course, I meant replacing lr with x30 in our code.

>> intent of the binutils change. And using #ifdefs is inaccurate,
>> because you can't really test the binutils version only the GCC
>> version, and those are not tightly coupled.
>>
>> Can you .unreq it?
>
> adding the author of the change to cc
>
> https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=62e20ed45e3da5f3ba695e4ee109317668180fe6
>
> There probably was some reasoning behind the change and an
> intended method for using it.
>
>     Arnd

[toc] | [prev] | [next] | [standalone]


#1709404

FromCatalin Marinas <catalin.marinas@arm.com>
Date2017-08-11 11:30 +0200
Message-ID<udeqt-1IZ-7@gated-at.bofh.it>
In reply to#1709001
On Thu, Aug 10, 2017 at 01:13:22PM -0700, Laura Abbott wrote:
> Fedora rawhide recently upgraded to binutils 2.29 and this seems
> to produce new warnings:
> 
> ./arch/arm64/include/asm/assembler.h: Assembler messages:
> ./arch/arm64/include/asm/assembler.h:125: Warning: ignoring attempt to redefine built-in register 'lr'
> 
> This is
> 
> /*
>  * Register aliases.
>  */
> lr      .req    x30             // link register

Strange, does gas now think 'lr' is a general purpose register (aliased
to x30)? It never was and IIRC the toolchain people many years ago
refused to add it, hence the alias above in the kernel. I wonder if they
added 'fp' as well...

We could remove the alias and replace all 'lr' instances with 'x30'
throughout the kernel (no too many) or we add some #ifdef around the
above based on the binutils version.

-- 
Catalin

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web