[gold patch] do not allocate common symbols within the discarded output sections
Viktor Kutuzov
vkutuzov@accesssoftek.com
Mon Oct 10 20:07:00 GMT 2011
ping
On Tue, 2011-09-27 at 15:28 -0700, Viktor Kutuzov wrote:
> Gold gets an internal error on computing of the final values for the
> common symbols which were allocated within the discarded output
> sections. An appropriate output section could be discarded by the linker
> script.
>
> Please find attached patch which prevents allocating of the common
> symbols if its target output section has been discarded by any reason.
>
> The command line below reproduces the problem. I tested it on CentOS
> 5.x/i386, but it should be reproducible on the different systems also.
>
> vkutuzov@:/opt/build/binutils/src/gold/testsuite$ ../ld-new \
> -m elf_i386 --eh-frame-hdr --hash-style=gnu \
> -L/usr/lib -L/usr/lib/gcc/i386-redhat-linux/4.1.1 \
> -l:crt1.o -l:crti.o -l:crtbegin.o \
> -nostartfiles -nostdlib -T memory_test.t memory_test.o \
> -o memory_test -lc -l:crtend.o -l:crtn.o
>
> ../ld-new: internal error in address, at output.h:72
>
>
> The memory_test.t script is a linker script from the current gold
> testsuite set.
>
> Would you review this patch?
>
> Thanks.
> Viktor
>
>
> * common.cc (Symbol_table::do_allocate_commons_list): prevent
> allocation of the common symbols within the discarded output
> sections.
>
More information about the Binutils
mailing list