bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/6617] New: Implicit shared library dependencies are not handle


From: kris dot van dot hees at oracle dot com
Subject: [Bug gold/6617] New: Implicit shared library dependencies are not handled correctly
Date: 10 Jun 2008 16:38:38 -0000

Gold does not seem to handle implicit shared library dependencies.  The
following test case fails:

bar.c:
------
int bar() {
    return 0;
}

foo.c:
------
extern int bar();

int foo() {
    return bar();
}

app.c:
------
extern int foo();
extern int bar();

int main(int argc, char *argv[]) {
    foo();
    bar();
}

Sequence of commands to reproduce:
----------------------------------
gcc -c -o app.o app.c
gcc -fpic -c -o foo.o foo.c
gcc -fpic -c -o bar.o bar.c
ld -shared -olibbar.so bar.o
ld -shared -olibfoo.so -L. -lbar foo.o
gcc -o app -Wl,-rpath,. -L. -lfoo app.o

Output:
-------
/usr/bin/ld: app.o: in function main:app.c(.text+0x1f): undefined reference to 
'bar'
collect2: ld returned 1 exit status

Reference:
----------
This example works perfectly with the old linker.

-- 
           Summary: Implicit shared library dependencies are not handled
                    correctly
           Product: binutils
           Version: 2.19 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: ian at airs dot com
        ReportedBy: kris dot van dot hees at oracle dot com
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=6617

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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