This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: VMA section overlap warnings for overlays
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at redhat dot com>, David Stubbs <stubbs at icerasemi dot com>, binutils at sourceware dot org
- Cc: Alan Modra <amodra at gmail dot com>
- Date: Fri, 25 Feb 2011 07:54:55 -0800
- Subject: Re: VMA section overlap warnings for overlays
- References: <20100715141753.GI31087@bubble.grove.modra.org> <AANLkTin6LROD7EYNNjVk6z_lflaoyczHpv6iHzSvGW5s@mail.gmail.com> <m3d3uox15y.fsf@hase.home> <AANLkTimsUfwjV0LTKabsdnIhbR1aSFGcJ3VLV8nApK2d@mail.gmail.com> <m34ofzx4d7.fsf@hase.home> <20100716093630.GN31087@bubble.grove.modra.org> <m3tynv7ict.fsf@hase.home> <20100720054451.GF19525@bubble.grove.modra.org> <20100720141031.GI19525@bubble.grove.modra.org> <AANLkTinZVnBqun1qxJHgWiFfYkHWF=XpxGFz2aX65v8B@mail.gmail.com> <20110225074917.GB5959@bubble.grove.modra.org>
On Thu, Feb 24, 2011 at 11:49 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Feb 24, 2011 at 03:49:25PM -0800, H.J. Lu wrote:
>> On Tue, Jul 20, 2010 at 7:10 AM, Alan Modra <amodra@gmail.com> wrote:
>> > This removes all the special treatment for zero size sections when
>> > using ELF_SECTION_IN_SEGMENT in elf.c, and makes readelf display
> [snip]
>> This may have caused:
>>
>> http://sourceware.org/bugzilla/show_bug.cgi?id=12516
>
> Yes, looks like it.
>
> ? ? ? ?PR 12519
> ? ? ? ?* internal.h (ELF_SECTION_IN_SEGMENT_1): Don't match zero size
> ? ? ? ?sections at start or end of PT_DYNAMIC.
I checked in this.
H.J.
---
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index b7de27d..4ff663f 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12516
+ * ld-elf/dynamic1.d: New.
+ * ld-elf/dynamic1.ld: Likewise.
+ * ld-elf/dynamic1.s: Likewise.
+
2011-02-25 Alan Modra <amodra@gmail.com>
* ld-mn10300/i135409-3.s: Correct .size label reference.
diff --git a/ld/testsuite/ld-elf/dynamic1.d b/ld/testsuite/ld-elf/dynamic1.d
new file mode 100644
index 0000000..6a8ba55
--- /dev/null
+++ b/ld/testsuite/ld-elf/dynamic1.d
@@ -0,0 +1,10 @@
+#ld: -shared -T dynamic1.ld
+#readelf: -l --wide
+#target: *-*-linux* *-*-gnu*
+
+#...
+ Section to Segment mapping:
+ Segment Sections...
+#...
+ 0[1-9] .dynamic[ ]*
+#pass
diff --git a/ld/testsuite/ld-elf/dynamic1.ld b/ld/testsuite/ld-elf/dynamic1.ld
new file mode 100644
index 0000000..d110bf7
--- /dev/null
+++ b/ld/testsuite/ld-elf/dynamic1.ld
@@ -0,0 +1,8 @@
+SECTIONS
+{
+ . = SIZEOF_HEADERS;
+ .text : { *(.text) }
+ .data : { *(.data) }
+ .data1 : { KEEP (*(.data1)) }
+ .dynamic : { *(.dynamic) }
+}
diff --git a/ld/testsuite/ld-elf/dynamic1.s b/ld/testsuite/ld-elf/dynamic1.s
new file mode 100644
index 0000000..f1caf0e
--- /dev/null
+++ b/ld/testsuite/ld-elf/dynamic1.s
@@ -0,0 +1,2 @@
+.section .data1,"aw"
+.balign 16