http://sourceware.org/bugzilla/show_bug.cgi?id=13250
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-05 20:11:54
UTC ---
A small testcase:
hjl@gnu-6 pr13250]$ cat foo.c
char mpi_fortran_argv_null_[8];
[hjl@gnu-6 pr13250]$ cat bar.c
extern char mpi_fortran_argv_null_[8];
int
bar ()
{
return mpi_fortran_argv_null_[0];
}
[hjl@gnu-6 pr13250]$ cat main.c
char mpi_fortran_argv_null_[1];
extern int bar ();
int
main ()
{
bar ();
return 0;
}
[hjl@gnu-6 pr13250]$ make
gcc -g -c -o main.o main.c
gcc -shared -fPIC -g -o libfoo.so foo.c
gcc -shared -fPIC -g -o libbar.so bar.c libfoo.so
gcc -Wl,--as-needed -o x main.o libbar.so libfoo.so -Wl,-rpath,.
/usr/local/bin/ld: main.o(.debug_info+0x7e): unresolvable R_X86_64_64
relocation against symbol `mpi_fortran_argv_null_'
./x
[hjl@gnu-6 pr13250]$
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils