Roland Baumann <roland.baum...@coware.com> writes: > I have a problem with gcc 4.1.2 and the gold linker (from binutils > 2.19). We build shared objects with options "-s" and "-shared" > together. This leads to assertions in the gold linker. In most cases I > see > > .../gold/real-ld: internal error in get_output_view, at > ...src/binutils-2.19/gold/output.h:3081 > collect2: ld returned 1 exit status > > But for the very simple example provided below, I see a different assertion: > > .../gold/real-ld: internal error in write_local_symbols, at > .../src/binutils-2.19/gold/object.cc:1471 > collect2: ld returned 1 exit status > > The example to trigger this error is: > > ---------------------------------------------- > #include <iostream> > void print() { > std::cout << "Hello World!" << std::endl; > } > ---------------------------------------------- > > I compile this with: > >> g++-4.1.2 -c test_shared.cc -o test_shared.o >> g++-4.1.2 -B <path_to_gold> -shared -s test_shared.o -o test_shared.so
I'm not able to recreate this problem with either binutils 2.19 or with the development version. Can you post the output of your -shared command line with the -v option? That will show precisely how the linker is being invoked. Also, for which target did you configure? Ian _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils