[Bug ld/27590] `.gnu.debuglto_.debug_macro' referenced in section `.gnu.debuglto_.debug_macro' of X defined in discarded section

2021-03-20 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27590

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |2.37

--- Comment #15 from H.J. Lu  ---
Fixed for 2.37.

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


[Bug ld/27587] BFD (and gold) DWARF reader choke on DWARF5 as generated by LTO

2021-03-20 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27587

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.37
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #9 from H.J. Lu  ---
Fixed for 2.37.

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


[Bug ld/27590] `.gnu.debuglto_.debug_macro' referenced in section `.gnu.debuglto_.debug_macro' of X defined in discarded section

2021-03-20 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=27590

--- Comment #16 from Martin Liska  ---
Thank you H.J. for the fixes!

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


[Bug gold/27303] gold/testsuite/initpri3. test fails on gold and lld, passes on bfd. Which one is correct?

2021-03-20 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27303

Cary Coutant  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED
   Assignee|unassigned at sourceware dot org   |ccoutant at gmail dot 
com

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


[Bug ld/21464] relocation truncated to fit: R_OR1K_GOT16 on OpenRISC, when linking libQtGui.so.4.8.7

2021-03-20 Thread shorne at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21464

--- Comment #7 from Stafford Horne  ---
On Wed, Mar 17, 2021 at 10:10:13PM +, shorne at gmail dot com wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=21464
> 
> --- Comment #6 from Stafford Horne  ---
> On Wed, Mar 17, 2021 at 09:31:59PM +, giulio.benetti at micronovasrl dot
> com wrote:
> > https://sourceware.org/bugzilla/show_bug.cgi?id=21464
> > 
> > --- Comment #5 from Giulio Benetti  
> > ---
> > Hi Nick,
> > 
> > this bug still shows up with binutils 2.36.1 like:
> > /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld:
> > BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377
> > /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld:
> > BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377
> > /home/giuliobenetti/git/upstream/or1k-binutils-2.36.1/host/lib/gcc/or1k-buildroot-linux-uclibc/9.3.0/../../../../or1k-buildroot-linux-uclibc/bin/ld:
> > BFD (GNU Binutils) 2.36.1 assertion fail elf32-or1k.c:2377
> > collect2: error: ld returned 1 exit status
> > 

Hello,

I was able to reproduce the "assertion fail elf32-or1k.c:2377" issue with my
latest glibc toolchain versions, and I also did some debugging of LD to try to
get an idea of what is going on.

Reproduced with:
  - Just building protobuf on its own, not using buildroot, that was giving me
some exceptions about not being able to find a thread librarty.

Notes

1. The "relocation truncated to fit: R_OR1K_GOT16" error seems not be outputted
   in the latest LD.  I maybe have removed it incorrectly with some recent
changes?  The
   issue is not fixed.  The R_OR1K_GOT16 relocation limit means OpenRISC fails
to
   run some PLT entries at run time when there are too many symbols.  I am
planning
   to fix this.

   I have two ideas:
1. When we get to big plt entries over the limit will use 2 relocations to
   compose the GOT offset
2. Use an extra PLT trampoline entry to add the extra offset i.e. 16k
   When we go over 32k we have another trampoline, that adds 16k and jumps
to
  the previous trampoline.

2. The "assertion fail elf32-or1k.c:2377" seems to be something different to
me,
   and not related to the count of GOT entries, maybe it should be a different
bug issue?

3. When debugging the "assertion fail elf32-or1k.c:2377" I see, the line we are
failing on is:

   Breakpoint 1, or1k_elf_finish_dynamic_symbol (output_bfd=0x568460,
info=0x543320 , h=0x81c0f8, sym=0x7fffb260) at
/home/shorne/work/gnu-toolchain/binutils-gdb/bfd/elf32-or1k.c:2377
   2377  BFD_ASSERT (h->dynindx != -1);

   So, it's asserting that the dynindx is defined, in
or1k_elf_finish_dynamic_symbol before
   we write out the PLT entry.

   In the failure cases we see:

   h->root.type bfd_link_hash_defweak AND h->forced_local

   These failing symbols have been forced_local but we are still trying to
write the PLT entry.
   That doesn't seem to make much sense.

   The forced_local has been set in _bfd_elf_link_hash_hide_symbol(), the
generic
   elflink code:

  #0  _bfd_elf_link_hash_hide_symbol (info=0x543320 ,
h=0x2bcbeb8, force_local=1) at
/home/shorne/work/gnu-toolchain/binutils-gdb/bfd/elflink.c:7756
  #1  0x0045e61e in _bfd_elf_link_assign_sym_version (h=0x2bcbeb8,
data=0x7fffb2f0) at
/home/shorne/work/gnu-toolchain/binutils-gdb/bfd/elflink.c:2483
  #2  0x0043055d in bfd_link_hash_traverse (htab=0x56a790,
func=func@entry=0x45e33d <_bfd_elf_link_assign_sym_version>,
info=info@entry=0x7fffb2f0)

   I tried to look at other architectures and I see that most do the same
assert, so
   so would they also fail?

   In riscv (a relatively modern implementation) they seem to just detect this
case and return FALSE.
   I will try to do that and send a patch, but it will be hard to test.

   Any suggestion for a test case for this?

-Stafford

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