bug-binutils
[Top][All Lists]
Advanced

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

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


From: mliska at suse dot cz
Subject: [Bug gold/27441] New: Small inconsistency in between gold and bfd
Date: Fri, 19 Feb 2021 16:17:21 +0000

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
 0x0000000000000001 (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
 0x0000000000000001 (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.


reply via email to

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