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


On Mon, Jan 19, 2009 at 4:44 AM, Andreas Schwab <schwab@suse.de> wrote:
> "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.
>

I am checking in this patch.


H.J.
---
--- ./ChangeLog.foo	2009-01-19 06:58:24.000000000 -0800
+++ ./ChangeLog	2009-01-19 07:28:55.000000000 -0800
@@ -1,3 +1,7 @@
+2009-01-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* ld-elf/group9.s: Replace .byte with .long.
+
 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>

 	* ld-arm/arm-elf.exp (armeabitests): Add EABI attribute merging 3,
--- ./ld-elf/group9.s.foo	2009-01-14 13:52:49.000000000 -0800
+++ ./ld-elf/group9.s	2009-01-19 07:02:01.000000000 -0800
@@ -12,4 +12,4 @@ foo.data:
 	.globl bar
 	.type	bar,%function
 bar:
-	.byte foo.data
+	.long foo.data


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