This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: SEC_NEVER_LOAD cleanup
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>, Kai Tietz <ktietz70 at googlemail dot com>, binutils at sourceware dot org
- Date: Fri, 05 Nov 2010 05:00:19 +0000
- Subject: Re: SEC_NEVER_LOAD cleanup
- References: <20100916000335.GS16874@bubble.grove.modra.org> <4CB8BF7A.2090904@gmail.com> <20101016023559.GB26553@bubble.grove.modra.org> <AANLkTima-b18poWw=8RSP3-dT=2Vt2T4FhMd5oGH3OTr@mail.gmail.com> <20101017232913.GD26553@bubble.grove.modra.org> <AANLkTinX22GQw51=H3qSXURGp180EtOQ4JERmMRrmbT7@mail.gmail.com> <20101018134330.GF26553@bubble.grove.modra.org> <AANLkTikLoULv7uLOgfh452NSUoe9W_yH4_r_0Uwkt0Zt@mail.gmail.com> <AANLkTik2YxWnUwc0CVXYKtwKri7==BrowKe-E4NAPNqY@mail.gmail.com> <4CBF06B3.8050202@gmail.com> <20101026124613.GD5348@bubble.grove.modra.org>
On 26/10/2010 13:46, Alan Modra wrote:
> It seems we have irreconcilable differences between ELF and COFF in
> the treatment of NOLOAD. How does the following look to you COFF
> people?
Yes, please. With that, HEAD now DTRT, by which I mean behaves the same as
2.20 and earlier: the created section has an address and CONTENTS:
> 10 .gnu_debuglink_overlay 00000010 6123a000 6123a000 00213a00 2**2
> CONTENTS, EXCLUDE
... whereas unpatched HEAD omits the contents:
> 9 .gnu_debuglink_overlay 00000010 61239000 61239000 00000000 2**2
> EXCLUDE
... which is not the desired outcome.
I still have one discrepancy to tidy up, which is that running this command
on the generated DLL file:
> objcopy -g --add-gnu-debuglink=cygwin1.dbg cygwin0.dll
creates a section like so with 2.20:
> 12 .gnu_debuglink 00000010 61300000 61300000 00204600 2**2
> CONTENTS, READONLY
but creates a section like so:
> 12 .gnu_debuglink 00000010 61300000 61300000 00204c00 2**2
> CONTENTS, ALLOC, LOAD, READONLY, DATA
... with HEAD, either with or without your patch. I imagine this is down to
the styp to/from section flags conversion in coffcode.h, I'm investigating
that now.
cheers,
DaveK