[Bug binutils/27078] c++filt: demangling for float128 type is confusing on PowerPC

2020-12-16 Thread qiu.chaofan at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27078

--- Comment #2 from Qiu Chaofan  ---
Thanks for reply. I mean `__ibm128` is mangled as `g`, but `g` is demangled
into `__float128`, which is NOT mangled into `g`.

On PPC, the mangling looks correct to me. If in the perspective of demangler,
`__float128` is alias to `__ibm128`, that looks reasonable. But this still
looks like some type names inconsistency (between compiler and demangler).

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


[Bug ld/26256] Support mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER components in an output section

2020-12-16 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=26256

--- Comment #3 from Fangrui Song  ---
You can use the tests
https://github.com/llvm/llvm-project/blob/main/lld/test/ELF/linkerscript/linkorder.s
https://github.com/llvm/llvm-project/blob/main/lld/test/ELF/linkorder-mixed.s

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

--- Comment #7 from H.J. Lu  ---
(In reply to Howard Chu from comment #6)
> (In reply to H.J. Lu from comment #5)
> > We can just build libdep and install it manually.
> 
> I took a look at how liblto-plugin is built 
> https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=lto-plugin;
> h=ab65b7bf798a806198824c7fc578b9f3f4d4c62f;
> hb=64a54505ec8249178b9767d1420354f8eb55de50
> 
> We can get rid of the version and static libraries using this patch
> 
> diff --git a/ld/Makefile.am b/ld/Makefile.am
> index 2f59ee6169..929c017a85 100644
> --- a/ld/Makefile.am
> +++ b/ld/Makefile.am
> @@ -983,6 +983,7 @@ enablings.exp:
>  #
>  # Build a dummy plugin using libtool.
>  #
> +AM_LIBTOOLFLAGS = --tag=disable-static
>  noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
>  libldtestplug3.la libldtestplug4.la
>  libldtestplug_la_SOURCES = testplug.c
> @@ -1001,7 +1002,7 @@ libldtestplug4_la_LDFLAGS = -no-undefined -rpath
> /nowhere
>  bfdplugindir = $(libdir)/bfd-plugins
>  bfdplugin_LTLIBRARIES = libdep.la
>  libdep_la_SOURCES = libdep_plugin.c
> -libdep_la_LDFLAGS = -no-undefined -rpath /nowhere
> +libdep_la_LDFLAGS = -module -avoid-version
>  
>  # DOCUMENTATION TARGETS
>  # Manual configuration file; not usually attached to normal configuration,
> 
> It will still install the .la file though.

1. Just remove the .la file after it is installed during "make install".  Or
2. Add libdep.la to noinst_LTLIBRARIES and install libdep.so from
"make install-data-local".

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hyc at symas dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

--- Comment #6 from Howard Chu  ---
(In reply to H.J. Lu from comment #5)
> We can just build libdep and install it manually.

I took a look at how liblto-plugin is built 
https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=lto-plugin;h=ab65b7bf798a806198824c7fc578b9f3f4d4c62f;hb=64a54505ec8249178b9767d1420354f8eb55de50

We can get rid of the version and static libraries using this patch

diff --git a/ld/Makefile.am b/ld/Makefile.am
index 2f59ee6169..929c017a85 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -983,6 +983,7 @@ enablings.exp:
 #
 # Build a dummy plugin using libtool.
 #
+AM_LIBTOOLFLAGS = --tag=disable-static
 noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
 libldtestplug3.la libldtestplug4.la
 libldtestplug_la_SOURCES = testplug.c
@@ -1001,7 +1002,7 @@ libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
 bfdplugindir = $(libdir)/bfd-plugins
 bfdplugin_LTLIBRARIES = libdep.la
 libdep_la_SOURCES = libdep_plugin.c
-libdep_la_LDFLAGS = -no-undefined -rpath /nowhere
+libdep_la_LDFLAGS = -module -avoid-version

 # DOCUMENTATION TARGETS
 # Manual configuration file; not usually attached to normal configuration,

It will still install the .la file though.

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

--- Comment #5 from H.J. Lu  ---
We can just build libdep and install it manually.

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

--- Comment #4 from H.J. Lu  ---
(In reply to Howard Chu from comment #3)
> (In reply to H.J. Lu from comment #2)
> > A patch is posted at
> > 
> > https://sourceware.org/pipermail/binutils/2020-December/114553.html
> 
> Looking at the other two plugins there, shouldn't it instead keep the *.so
> file, and delete the .so.0 and .so.0.0.0 ?  (I recognize that the .so is
> just a
> symlink to the versioned filename, so this is a bit awkward.)

Any .so file is ok.

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hyc at symas dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

Howard Chu  changed:

   What|Removed |Added

 CC||hyc at symas dot com

--- Comment #3 from Howard Chu  ---
(In reply to H.J. Lu from comment #2)
> A patch is posted at
> 
> https://sourceware.org/pipermail/binutils/2020-December/114553.html

Looking at the other two plugins there, shouldn't it instead keep the *.so
file, and delete the .so.0 and .so.0.0.0 ?  (I recognize that the .so is just a
symlink to the versioned filename, so this is a bit awkward.)

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


[Bug binutils/27081] Unexpected output on nm version 2.35.50.0.1.20201215

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27081

H.J. Lu  changed:

   What|Removed |Added

 Resolution|--- |NOTABUG
   Target Milestone|--- |2.36
 Status|UNCONFIRMED |RESOLVED
Version|unspecified |2.36 (HEAD)

--- Comment #2 from H.J. Lu  ---
Fixed for 2.36.

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

H.J. Lu  changed:

   What|Removed |Added

URL||https://sourceware.org/pipe
   ||rmail/binutils/2020-Decembe
   ||r/114553.html

--- Comment #2 from H.J. Lu  ---
A patch is posted at

https://sourceware.org/pipermail/binutils/2020-December/114553.html

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

--- Comment #1 from H.J. Lu  ---
[hjl@gnu-cfl-2 release]$ ls usr/local/lib/bfd-plugins
libdep.a  libdep.la  libdep.so  libdep.so.0  libdep.so.0.0.0
[hjl@gnu-cfl-2 release]$ 

Only one of .so file is needed.

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


[Bug binutils/27081] Unexpected output on nm version 2.35.50.0.1.20201215

2020-12-16 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27081

--- Comment #1 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bcac599f73874fd63a3901f0a9f7d24e50c2ad24

commit bcac599f73874fd63a3901f0a9f7d24e50c2ad24
Author: H.J. Lu 
Date:   Wed Dec 16 13:40:42 2020 -0800

ld: Skip libdep plugin if not all plugin hooks are available

Skip plugin if not all required plugin hooks are available.

2020-12-16  Howard Chu 
H.J. Lu  

PR ld/27081
* libdep_plugin.c (onload): Skip if not all required plugin hooks
are available.
* testsuite/config/default.exp (dep_plug_opt): New.
* testsuite/ld-elf/elf.exp: Pass $dep_plug_opt to nm.
* testsuite/ld-elf/pr26391.fd: New file.

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


[Bug ld/27082] Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.36

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


[Bug binutils/27078] c++filt: demangling for float128 type is confusing on PowerPC

2020-12-16 Thread ian at airs dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27078

Ian Lance Taylor  changed:

   What|Removed |Added

 CC||ian at airs dot com

--- Comment #1 from Ian Lance Taylor  ---
You filed this against the demangler, but it seems to me that the demangler is
doing the right thing given the strings that it is given.  If anything should
change here, it seems that it should be the mangling.  If you disagree, how do
you think the demangler should handle this symbol name?

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


[Bug ld/27082] New: Only one libdep.so should installed

2020-12-16 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27082

Bug ID: 27082
   Summary: Only one libdep.so should installed
   Product: binutils
   Version: 2.36 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

[hjl@gnu-cfl-2 gcc]$ ls /usr/lib64/bfd-plugins
libdep.so  libdep.so.0  libdep.so.0.0.0  liblto_plugin.so  LLVMgold.so
[hjl@gnu-cfl-2 gcc]$ 

libdep.so.0 and libdep.so.0.0.0 are unnecessary.

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


[Bug binutils/27081] New: Unexpected output on nm version 2.35.50.0.1.20201215

2020-12-16 Thread joao.moreira at intel dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27081

Bug ID: 27081
   Summary: Unexpected output on nm version 2.35.50.0.1.20201215
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: joao.moreira at intel dot com
  Target Milestone: ---

GNU nm version 2.35.50.0.1.20201215 (which is part of the latest Fedora 33
package) has unexpected outputs. The bug was noticed while configuring upstream
glibc with the respective package on Fedora 33.

Invoking nm over a manually compiled test, similarly as done in the glibc
configure file, will result in the following output:

bfd plugin: No register_all_symbols_read hook

And this causes the following error in the glibc configure:

checking for __builtin_trap with no external dependencies... configure: error:
confusing output from nm -u

FTR, applying the below diff to the glibc configure works as a temporary
workaround for the bug (but is hardly a solution).

-libc_undefs=`$NM -u conftest.o |
+libc_undefs=`$NM -u conftest.o | grep -v bfd |

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


[Bug binutils/27078] New: c++filt: demangling for float128 type is confusing on PowerPC

2020-12-16 Thread qiu.chaofan at outlook dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27078

Bug ID: 27078
   Summary: c++filt: demangling for float128 type is confusing on
PowerPC
   Product: binutils
   Version: 2.35
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: qiu.chaofan at outlook dot com
  Target Milestone: ---

Simple program:

  __ibm128 foo(__ibm128 a, __ibm128 b) {
return a + b;
  }

  __float128 foo2(__float128 a, __float128 b) {
return a + b;
  }

GCC will mangle the names as `_Z3foogg` and `_Z4foo2u9__ieee128u9__ieee128`.

However, use `c++filt` to demangle them, it outputs `foo(__float128,
__float128)` and `foo2(__ieee128, __ieee128)`. This is strange and confusing
since we use `u9__ieee128` for `__float128` type.

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