gold and shared objects with gcc 4.1.2

Ian Lance Taylor iant@google.com
Thu Jan 15 18:11:00 GMT 2009
Roland Baumann <roland.baumann@coware.com> writes:

>>>
>>> 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.
>>
>
> Here it comes:

Thanks.  Unfortunately I still can't recreate it.

I took a closer look at the code, and I found a possible problem if
there are local symbols which have to go into the dynamic symbol
table.  I committed this patch, which may fix your problem.

Ian


2009-01-15  Ian Lance Taylor  <iant@google.com>

	* object.cc (Sized_relobj::write_local_symbols): Don't write out
	local symbols when stripping all symbols.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 1562 bytes
Desc: Strip local symbols with -s
URL: <https://sourceware.org/pipermail/binutils/attachments/20090115/81570f9c/attachment.bin>


More information about the Binutils mailing list