This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld big trouble.
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 3 Sep 2009 00:16:21 +0930
- Subject: Re: ld big trouble.
- References: <4A9E7AD6.7040101@gmail.com>
On Wed, Sep 02, 2009 at 03:01:58PM +0100, Dave Korn wrote:
> GCC's partitioning options generate sections with names like ".text.unlikely",
> or ".text.cold" and ".text.hot". Shouldn't these text sections be governed by
> the same text_read_only flag? It breaks auto-import on PE platforms, because
> that requires that all text sections (well, all that have fixup imports
> anyway) be writable.
Input .text.* sections are usually merged in to the .text output
section on a final link.
> "text_read_only" member appears to have been added without being mentioned in
It's main use was to make .text writable for omagic a.out binaries.
I suspect that on !link_info.relocatable && !config.text_read_only you
could loop over all output sections removing SEC_READONLY, and do
nothing otherwise. .text ought to be SEC_READONLY by default.
--
Alan Modra
Australia Development Lab, IBM