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: Roland McGrath <mcgrathr at google dot com>
- To: Roland McGrath <mcgrathr at google dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 16 Aug 2013 09:49:58 -0700
- 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> <20130816102101 dot GG4024 at bubble dot grove dot modra dot org>
On Fri, Aug 16, 2013 at 3:21 AM, Alan Modra <amodra@gmail.com> wrote:
> 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.
Sorry, I don't follow. The next section in the address space is already
page-aligned (and far away). I don't see how that helps. The partial page
I'm concerned with is at the end of the code segment. Because of the
machinations in bfd/elf-nacl.c, that is at the end of the file (despite not
being the highest-addressed segment). What I need is for that segment to
extend to the next page boundary in the file, so that the non-allocated
sections (and shdrs) that follow start on the page boundary.
Perhaps I can have the modify_segment_map hook synthesize a fake section
that isn't really there or something. I'll play with that while I wait for
a better suggestion.
Thanks,
Roland