[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gold and shared objects with gcc 4.1.2
From: |
Ian Lance Taylor |
Subject: |
Re: gold and shared objects with gcc 4.1.2 |
Date: |
Wed, 14 Jan 2009 07:31:00 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Roland Baumann <address@hidden> 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