This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/9727: "ld -r --gc-sections --entry" doesn't work with COMDAT group
- From: Andreas Schwab <schwab at suse dot de>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 19 Jan 2009 13:44:21 +0100
- Subject: Re: PATCH: PR ld/9727: "ld -r --gc-sections --entry" doesn't work with COMDAT group
- References: <20090114180554.GA2559@lucon.org>
"H.J. Lu" <hongjiu.lu@intel.com> writes:
> --- binutils/ld/testsuite/ld-elf/group9.s.gc 2009-01-14 09:57:04.000000000 -0800
> +++ binutils/ld/testsuite/ld-elf/group9.s 2009-01-14 09:55:32.000000000 -0800
> @@ -0,0 +1,15 @@
> + .section .text.foo,"axG",%progbits,foo,comdat
> + .globl foo
> + .type foo,%function
> +foo:
> + .byte 0
> + .section .data.foo,"axG",%progbits,foo,comdat
> + .globl foo.data
> + .type foo,%object
> +foo.data:
> + .byte 0
> + .section .text.bar,"axG",%progbits,bar,comdat
> + .globl bar
> + .type bar,%function
> +bar:
> + .byte foo.data
This is not portable, it requires support for a BFD_RELOC_8 relocation,
which quite a few targes don't provide.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."