[Bug ld/27259] ld: Support SHF_LINK_ORDER self-link

2021-02-19 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=27259

--- Comment #10 from Fangrui Song  ---
On LLD side, I've sent
https://lists.llvm.org/pipermail/llvm-dev/2021-February/148682.html to seek for
feedback whether we can drop the "__start_/__stop_ retain C identifier name
sections" rule.

On the Linux kernel side, I've created
https://github.com/ClangBuiltLinux/linux/issues/1307 to ask for tests.

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


[Bug ld/27442] FAIL: Local ifunc-using executable does not contain R_*_IRELATIVE relocation

2021-02-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27442

John David Anglin  changed:

   What|Removed |Added

   Host||hppa-unknown-linux-gnu
  Build||hppa-unknown-linux-gnu
 Target||hppa-unknown-linux-gnu

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


[Bug ld/27443] New: FAIL: pr25355.o

2021-02-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27443

Bug ID: 27443
   Summary: FAIL: pr25355.o
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -fno-lto -flto -fno-common
-fno-fat-
lto-objects -c /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr25355.c -o
t
mpdir/pr25355.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-plugin -g -O2   -c -g -O2 -fno-lto
-
flto -fno-common -fno-fat-lto-objects -c
/home/dave/gnu/binutils/src/ld/testsuit
e/ld-plugin/pr25355.c -o tmpdir/pr25355.o 2>&1}  /dev/null ld.tmp (timeout =
300
)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../binutils/nm-new --plugin
/home/dave/opt/tes
t/libexec/gcc/hppa-linux-gnu/10.0.0/liblto_plugin.so tmpdir/pr25355.o >
dump.out
extra regexps in /home/dave/gnu/binutils/src/ld/testsuite/ld-plugin/pr25355.d
st
arting with "^[0-9a-f]+ [BS] _?nm_test_var$"
EOF from dump.out
FAIL: pr25355.o

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


[Bug ld/27442] New: FAIL: Local ifunc-using executable does not contain R_*_IRELATIVE relocation

2021-02-19 Thread danglin at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27442

Bug ID: 27442
   Summary: FAIL: Local ifunc-using executable does not contain
R_*_IRELATIVE relocation
   Product: binutils
   Version: 2.37 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---

gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC -c
/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc/prog.c -o tmpdir/shared_prog.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/prog.c -o
tmpdir/shared_prog.o
 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE -c
/home/dave/gnu/binutils
/src/ld/testsuite/ld-ifunc/prog.c -o tmpdir/static_prog.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/prog.c -o
tmpdir/static_pro
g.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC -DWITH_IFUNC -c
/home/dave/gn
u/binutils/src/ld/testsuite/ld-ifunc/lib.c -o tmpdir/shared_ifunc.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fPIC
-DW
ITH_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdir/s
hared_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/sr
c/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE -DWITH_IFUNC -c
/home/dave
/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o tmpdir/static_ifunc.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -fno-PIE
-DWITH_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdi
r/static_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c
-DWITHOUT_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdir/static_noifunc.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c
-DWITHOUT_IFUNC -c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/lib.c -o
tmpdir/static_noifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../gas/as-new  
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc   -o tmpdir/empty.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-elf/empty.s
Executing on host: sh -c {/home/dave/gnu/binutils/objdir/ld/../gas/as-new  
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc   -o tmpdir/empty.o
/home/dave/gnu/binutils/src/ld/testsuite/ld-elf/empty.s 2>&1}  /dev/null ld.tmp
(timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/test-1.c -o tmpdir/test-1.o
Executing on host: sh -c {gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -c -c
/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/test-1.c -o tmpdir/test-1.o
2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
gcc  -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/
-I/home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc -g -O2   -fno-lto -fPIC -c
-c /home/dave/gnu/binutils/src/ld/testsuite/ld-ifunc/test-2.c -o
tmpdir/test-2.o
spawn [open ...]
./ld-new   -o tmpdir/libshared_ifunc.so -shared tmpdir/shared_ifunc.o
Executing on host: sh -c {./ld-new   -o tmpdir/libshared_ifunc.so -shared
tmpdir/shared_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]
/home/dave/gnu/binutils/objdir/ld/../binutils/ar   rc tmpdir/libifunc.a
tmpdir/static_ifunc.o
Executing on host: sh -c {/home/dave/gnu/binutils/objdir/ld/../binutils/ar   rc
tmpdir/libifunc.a tmpdir/static_ifunc.o 2>&1}  /dev/null ld.tmp (timeout = 300)
spawn [open ...]

gcc -B/home/dave/gnu/binutils/objdir/ld/tmpdir/ld/  
-L=/home/dave/opt/test/hppa-unknown-linux-gnu/lib -L=/home/dave/opt/test/lib
-L=/usr/local/lib -L=/lib -L=/usr/lib  -o 

[Bug gold/27441] Small inconsistency in between gold and bfd

2021-02-19 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27441

--- Comment #1 from Alan Modra  ---
As-needed shared libraries are supposed to behave like archives in the sense
that they should only be seen to be needed if they satisfy a non-weak undefined
symbol reference *at the point they are loaded*.  Since you are loading
-lpthread before the object file with the reference to "close", -lpthread
should not be marked as needed.  ld.bfd is correct here.

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


[Bug libctf/27297] libctf.a malformed, build fails on x86_64-apple-darwin18.7.0

2021-02-19 Thread seanga2 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27297

seanga2 at gmail dot com changed:

   What|Removed |Added

 CC||seanga2 at gmail dot com

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


[Bug libctf/25216] libctf doesn't respect a build configured with --with-system-zlib

2021-02-19 Thread seanga2 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25216

seanga2 at gmail dot com changed:

   What|Removed |Added

 CC||seanga2 at gmail dot com

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


[Bug libctf/27360] libctf.so.0: undefined symbol: bsearch_r

2021-02-19 Thread seanga2 at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27360

seanga2 at gmail dot com changed:

   What|Removed |Added

 CC||seanga2 at gmail dot com

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


Issue 27734 in oss-fuzz: binutils:fuzz_readelf: Abrt with empty stacktrace

2021-02-19 Thread sheriffbot via monorail
Updates:
Labels: -restrict-view-commit

Comment #7 on issue 27734 by sheriffbot: binutils:fuzz_readelf: Abrt with empty 
stacktrace
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27734#c7

This bug has been fixed for 30 days. It has been opened to the public.

- Your friendly Sheriffbot

-- 
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.

[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path

2021-02-19 Thread holger.berger at googlemail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26541

--- Comment #6 from holger.berger at googlemail dot com ---
correct... the proper patch would not contain the 524 thing,
but some sort of patch is needed.

Am Fr., 19. Feb. 2021 um 18:56 Uhr schrieb bugdal at aerifal dot cx <
sourceware-bugzi...@sourceware.org>:

> https://sourceware.org/bugzilla/show_bug.cgi?id=26541
>
> --- Comment #5 from Rich Felker  ---
> Ah no, at least according to your patch the original gold bug seems to be
> there
> still too.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

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


[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path

2021-02-19 Thread bugdal at aerifal dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=26541

--- Comment #5 from Rich Felker  ---
Ah no, at least according to your patch the original gold bug seems to be there
still too.

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


[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path

2021-02-19 Thread holger.berger at googlemail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26541

--- Comment #3 from holger.berger at googlemail dot com ---
for me this patch works, but I think lustre should not leak it's internal error
code to teh client side, so the lustre part should probably not be part of an
official fix, and I think later versions of lustre fix that issue.

diff --git a/gold/output.cc b/gold/output.cc
index b7505ff..23a24ce 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -134,16 +134,17 @@ gold_fallocate(int o, off_t offset, off_t len)
   if (parameters->options().posix_fallocate())
 {
   int err = ::posix_fallocate(o, offset, len);
-  if (err != EINVAL && err != ENOSYS && err != EOPNOTSUPP)
+  if (err != EINVAL && err != ENOSYS && err != EOPNOTSUPP && err != 524 /*
LUSTRE_ENOTSUPP == 524 Operation is not supported */ )
return err;
 }
 #endif // defined(HAVE_POSIX_FALLOCATE)

 #ifdef HAVE_FALLOCATE
   {
+errno = 0;
 int err = ::fallocate(o, 0, offset, len);
-if (err != EINVAL && err != ENOSYS && err != EOPNOTSUPP)
-  return err;
+if (err == -1 && (errno != EINVAL && errno != ENOSYS && errno !=
EOPNOTSUPP && errno != 524 /* LUSTRE_ENOTSUPP == 524 Operation is not supported
*/ ))
+  return errno;
   }
 #endif // defined(HAVE_FALLOCATE)

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


[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path

2021-02-19 Thread bugdal at aerifal dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=26541

--- Comment #2 from Rich Felker  ---
Why is this still open? It's trivial to fix.

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


[Bug gold/27441] Small inconsistency in between gold and bfd

2021-02-19 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=27441

Martin Liska  changed:

   What|Removed |Added

 CC||amodra at gmail dot com,
   ||hjl.tools at gmail dot com

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


[Bug gold/26541] gold makes incorrect usage of fallocate in fallback path

2021-02-19 Thread holger.berger at googlemail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26541

holger.berger at googlemail dot com changed:

   What|Removed |Added

 CC||holger.berger at googlemail 
dot co
   ||m

--- Comment #1 from holger.berger at googlemail dot com ---
I see the same thing, and it actually leads to failure of ld.gold on a certain
version of lustre filesystem.

ld.gold: fatal error: a.out: Unknown error 524

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


[Bug gold/27441] New: Small inconsistency in between gold and bfd

2021-02-19 Thread mliska at suse dot cz
https://sourceware.org/bugzilla/show_bug.cgi?id=27441

Bug ID: 27441
   Summary: Small inconsistency in between gold and bfd
   Product: binutils
   Version: 2.37 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ccoutant at gmail dot com
  Reporter: mliska at suse dot cz
CC: ian at airs dot com
  Target Milestone: ---

I see the following discrepancy with the latest bintuils release:

$ cat umapfile.i
extern "C" int close(int);
void uprv_mapFile_67() {
  int fd;
  close(fd);
}

BFD:
$ g++ umapfile.i -O2 -c && g++ -o lib1.so -Wl,--as-needed -shared -lpthread
-fuse-ld=bfd umapfile.o && readelf -d lib1.so | grep NEEDED
 0x0001 (NEEDED) Shared library: [libc.so.6]

GOLD:
$ g++ umapfile.i -O2 -c && g++ -o lib1.so -Wl,--as-needed -shared -lpthread
-fuse-ld=gold umapfile.o && readelf -d lib1.so | grep NEEDED
 0x0001 (NEEDED) Shared library: [libpthread.so.0]

It seems close can be fulfilled by both libs, is there any guarantee which
library is selected for NEEDED?

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