This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/4701: binutils generates invalid klibc-based binary on Linux x86_64
On Fri, Jun 29, 2007 at 11:01:52AM +0930, Alan Modra wrote:
> On Thu, Jun 28, 2007 at 06:19:28PM -0700, H. J. Lu wrote:
> > > The p_filesz adjust should really only happen if sections mapped to
> > > the segment need file space. This bug has been around forever, but
> > > note that it's not incorrect to allocated zero-filled file space for
> > > bss sections, just unnecessary. However, allocating this space
> >
> > Is there a way to fix this?
>
> I've committed a fix.
>
I am checking in this testcase.
H.J.
----
2007-06-27 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4701
* ld-elf/noload-2.d: New.
--- ld/testsuite/ld-elf/noload-2.d.bss 2007-06-27 11:27:55.000000000 -0700
+++ ld/testsuite/ld-elf/noload-2.d 2007-06-27 11:38:42.000000000 -0700
@@ -0,0 +1,8 @@
+#source: noload-1.s
+#ld: -T noload-1.t -z max-page-size=0x200000
+#readelf: -Sl --wide
+#target: *-*-linux*
+
+#...
+ +LOAD +0x200000 +0x0+ +0x0+ +0x0+ +0x0+1 +RW +0x200000
+#pass