bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/17558] New: ld will follow DT_NEEDED when it is not necessary


From: rafael.espindola at gmail dot com
Subject: [Bug ld/17558] New: ld will follow DT_NEEDED when it is not necessary
Date: Wed, 05 Nov 2014 16:44:11 +0000

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

            Bug ID: 17558
           Summary: ld will follow DT_NEEDED when it is not necessary
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: rafael.espindola at gmail dot com

$ cat test3.c
void h(void) {
}
$ cat test2.c
void h(void);
void f(void) {
  h();
}
$ cat test.c
void f(void);
int main(void) {
  f();
}
$ gcc test3.c -fPIC -shared -o test3.so
$ gcc test2.c -fPIC -shared -o test2.so test3.so
$ gcc test.c -o test test2.so -fuse-ld=gold
$ gcc test.c -o test test2.so -fuse-ld=bfd
/home/espindola/inst/binutils/bin/ld.bfd: warning: test3.so, needed by
test2.so, not found (try using -rpath or -rpath-link)
test2.so: undefined reference to `h'
collect2: error: ld returned 1 exit status


But test.c doesn't use h or anything from test3.so at all. All that it needs is
test2.so and that has already been created.

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