This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC PATCH] pad out code segment for NaCl targets
- From: Alan Modra <amodra at gmail dot com>
- To: Roland McGrath <mcgrathr at google dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 16 Aug 2013 19:51:01 +0930
- Subject: Re: [RFC PATCH] pad out code segment for NaCl targets
- References: <CAB=4xhoo--ZQNgJapor=uXo3TvLMDtZWuHtr6dBD62sSdXMNwg at mail dot gmail dot com> <20130810075123 dot GY3294 at bubble dot grove dot modra dot org> <CAB=4xhrdx58DgqV4Vcorzv_tVjmXENvmFC_Lmnua2Df68GzP+g at mail dot gmail dot com>
On Thu, Aug 15, 2013 at 04:22:31PM -0700, Roland McGrath wrote:
> On Sat, Aug 10, 2013 at 12:51 AM, Alan Modra <amodra@gmail.com> wrote:
> > On Thu, Aug 08, 2013 at 02:17:04PM -0700, Roland McGrath wrote:
> >> I've figured out a way to make this happen, but I'm not very happy with it.
> >> I hope someone can recommend a different approach that will serve me better.
> >
> > elf_backend_final_write_processing perhaps?
>
> Clearly I could write out the fill regions there. But that is too late to
> adjust offsets for the parts of the file that come after a code segment
> (and thus need to be pushed out to the next page boundary), isn't it?
Ah, yes, you need to somehow page align any following sections before
assign_file_positions_for_{non_,}load_sections is called. That could
be done in the linker script without a new padding section.
--
Alan Modra
Australia Development Lab, IBM