bug-binutils
[Top][All Lists]
Advanced

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

[Bug gprofng/30006] Failure to build binutils-2.40 on i686


From: vladimir.mezentsev at oracle dot com
Subject: [Bug gprofng/30006] Failure to build binutils-2.40 on i686
Date: Thu, 02 Feb 2023 20:50:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=30006

--- Comment #14 from Vladimir Mezentsev <vladimir.mezentsev at oracle dot com> 
---
I installed Ubuntu and reproduced this problem in Docker.

This small test demonstrates the build problem:
% cat test.c 
void *dlopen (const char *pathname, int mode)
  { return (void *) 0; }

__attribute__ ((__symver__ ("dlopen@GLIBC_2.1")))
void *__collector_dlopen_2_1 (const char *pathname, int mode)
  { return (void *) 0; }

__attribute__ ((__symver__ ("dlopen@GLIBC_2.0")))
void *__collector_dlopen_2_0 (const char *pathname, int mode)
  { return (void *) 0; }

int main()
  { return 0; }


% cat map.txt 
GLIBC_2.0 {
        global:
                dlopen;
};

GLIBC_2.1 {
        global:
                dlopen;
};


There are no build problems on OL8:
% /opt/rh/gcc-toolset-10/root/bin/gcc -m32 test.c -Wl,--version-script
-Wl,map.txt

The output of `nm` shows exactly what I expected:
% nm ./a.out | grep dlopen
08049191 T __collector_dlopen_2_0
08049187 T __collector_dlopen_2_1
0804917d t dlopen
08049191 t dlopen@GLIBC_2.0
08049187 t dlopen@GLIBC_2.1


But on Ubunty:
% gcc -m32 test.c -Wl,--version-script -Wl,map.txt
/usr/local/bin/ld: warning: using 'GLIBC_2.0' as version for 'dlopen' which is
also named in version 'GLIBC_2.1' in script
/usr/local/bin/ld: error: /usr/local/tmp/cciDQaK2.o: multiple definition of
'dlopen'
/usr/local/bin/ld: /usr/local/tmp/cciDQaK2.o: previous definition here
collect2: error: ld returned 1 exit status


Is this a compiler bug on Ubuntu ?

I use:
% gcc --version
gcc (GCC) 12.2.1 20221102
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% uname -a
Linux vmezents-20230117-1534-i686 5.15.0-1021-oracle #27-Ubuntu SMP Fri Oct 14
20:04:26 UTC 2022 i686 AMD EPYC 7J13 64-Core Processor AuthenticAMD GNU/Linux


Also I thing the warning is not needed.
Why dlopen cannot be in GLIBC_2.0 and GLIBC_2.1 ?

-- 
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]