[Bug ld/22397] BFD internal error when message locale isn't C

2017-11-05 Thread nintendocatz at msn dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22397

--- Comment #3 from nintendocatz at msn dot com ---
Hello again,

I recompiled binutils and tried it on the example of the first bug report.

$ $ ld --version
GNU ld (GNU Binutils) 2.29.51.20171105

$ cat wtf.c++
#include 
void lol() { std::cout << "fail"; }

$ LC_ALL="fr_FR.UTF-8" g++ -shared wtf.cpp 
/usr/bin/ld: /tmp/ccPxsBgC.o: relocation R_X86_64_PC32 against symbole
`_ZSt4cout@@GLIBCXX_3.4' can not be used when making a shared object; recompilé
avec -fPIC
/usr/bin/ld : échec de l'édition de liens finale : Mauvaise valeur
collect2: error: ld a retourné le statut de sortie 1

So... the translation has a few problems (the beginning is in english, and -- I
believe -- "recompilé" should be "recompilez") but at least now there's a
proper error message.

Thanks a lot !

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22397] New: BFD internal error when message locale isn't C

2017-11-04 Thread nintendocatz at msn dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22397

Bug ID: 22397
   Summary: BFD internal error when message locale isn't C
   Product: binutils
   Version: 2.29
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: nintendocatz at msn dot com
  Target Milestone: ---

Hello,

Arch user here, I just hit this exact same bug with ld-2.29.1 without any
patches :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873485

I will repeat the information from this bug report here :

When ld tries to localize a you-need-fPIC error in fr_FR.UTF-8 (french),
it aborts ("abandon") with an internal error ("erreur interne"):

$ cat wtf.c++
#include 
void lol() { std::cout << "fail"; }

$ LC_ALL="fr_FR.UTF-8" g++ -shared wtf.c++
/usr/bin/ld: /usr/bin/ld: BFD erreur interne (GNU Binutils for Debian)
2.29, abandon à ../../bfd/bfd.c:843 dans _doprnt

/usr/bin/ld: Merci de rapporter cette anomalie.

collect2: error: ld returned 1 exit status

When switching to C locale, ld outputs an error as expected:

$ LC_ALL="C" g++ -shared wtf.c++
/usr/bin/ld: /tmp/ccomgT5o.o: relocation R_X86_64_PC32 against symbol
`_ZSt4cout@@GLIBCXX_3.4' can not be used when making a shared object;
recompile with -fPIC /usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status


I'm not sure if the bug can be triggered with any other locale.
I couldn't find any bug report looking similar to this one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils