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: ld big trouble.


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


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