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: [RFC PATCH] pad out code segment for NaCl targets


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?

In the normal NaCl layout, there is one code segment and it comes last in
the file, so only non-allocated sections and shdrs come after it.  AFAIK
the shdrs themselves are the only things that I could actually move this
late.  Even if I could move the non-allocated sections (including
.shstrtab) too, I don't think I'd want to make the logic assume that there
is only one code segment and that it is last in the file.

Can you elaborate on your suggestion?


Thanks,
Roland


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