This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gold: pad code segments out to page size for isolate_execinstr targets
- From: Cary Coutant <ccoutant at google dot com>
- To: Roland McGrath <mcgrathr at google dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 27 Aug 2013 14:32:36 -0700
- Subject: Re: [PATCH] gold: pad code segments out to page size for isolate_execinstr targets
- Authentication-results: sourceware.org; auth=none
- References: <CAB=4xhrmv4R_ZMM-8PMXQUJwz1fho=wUF6qPzUcu6xDbBmL0Dw at mail dot gmail dot com>
> This makes gold for isolate_execinstr targets (i.e. NaCl targets) pad
> code segments out to the ABI page size with code fill. This brings
> gold in line with what BFD ld does for *-*-nacl* targets after my
> recent change there.
>
> Ok for trunk and 2.23?
This is OK. Thanks!
While I don't think it's a big deal that you can only generate 1-byte
NOPs because of the cache boundary issue, you could have added an
extra parameter to Target::code_fill to provide the address, so that
the target-specific method could use that to figure out what size NOPs
it could generate.
Also, for your purposes, I'd suggest something less benign than NOP
for the code fill -- HCF would be a better choice, don't you think?
-cary