bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/26324] Unused symbols in dynamic symbol table


From: hjl.tools at gmail dot com
Subject: [Bug ld/26324] Unused symbols in dynamic symbol table
Date: Fri, 31 Jul 2020 15:25:38 +0000

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com,
                   |                            |nickc at redhat dot com

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-cfl-2 pr26324]$ cat pr15146a.c
extern int xxx;

int
bar (void)
{
  return xxx;
}

int
main ()
{ 
  return 0;
}
[hjl@gnu-cfl-2 pr26324]$ cat pr15146b.c
int xxx = 3;
[hjl@gnu-cfl-2 pr26324]$ cat pr15146c.c
[hjl@gnu-cfl-2 pr26324]$ make
gcc -B./  -O2 -g -o x -Wl,-R,. \
  -Wl,--no-copy-dt-needed-entries -Wl,--no-as-needed pr15146a.o pr15146c.so
./ld: /tmp/ccHirkTe.debug.temp.o: undefined reference to symbol 'xxx'
./ld: ./pr15146b.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:15: x] Error 1
[hjl@gnu-cfl-2 pr26324]$

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