bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/23892] New: ld.gold fails partial linking on sparc64 for globa


From: slyfox at inbox dot ru
Subject: [Bug gold/23892] New: ld.gold fails partial linking on sparc64 for global registers: only registers %g[2367] can be declared using STT_REGISTER
Date: Sat, 17 Nov 2018 14:20:14 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23892

            Bug ID: 23892
           Summary: ld.gold fails partial linking on sparc64 for global
                    registers: only registers %g[2367] can be declared
                    using STT_REGISTER
           Product: binutils
           Version: 2.31
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: slyfox at inbox dot ru
                CC: ian at airs dot com
  Target Milestone: ---

Initially observed as a build failure of linux kernel:
    make defconfig
    make LD=sparc64-unknown-linux-gnu-ld.gold
    ...
    sparc64-unknown-linux-gnu-ld.gold: error: drivers/char/hw_random/core.o:
only registers %g[2367] can be declared using STT_REGISTER

Here is the minimal reproducer:

    $ cat bug.c
    register long a asm("g6");

    $ sparc64-unknown-linux-gnu-gcc -Wall -c -o bug0.o bug.c
    $ sparc64-unknown-linux-gnu-ld.gold -m elf64_sparc -r -o bug1-gold.o bug0.o
    $ sparc64-unknown-linux-gnu-ld.gold -m elf64_sparc -r -o bug2-gold.o
bug1-gold.o
    $ sparc64-unknown-linux-gnu-ld.gold: error: bug1-gold.o: only registers
%g[2367] can be declared using STT_REGISTER

Note, partial linking is very simple here as it uses single input source.
Second partial linking step should be a no-op (it is a no-op on bfd).

Attached source and emitted binaries.
Tool versions:
  binutils: 2.31.1
  gcc: 8.2.0
  target: sparc64-unknown-linux-gnu

Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]