This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/9727: "ld -r --gc-sections --entry" doesn't work with COMDAT group


"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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]