Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Issue 13638011: Align and pad code segments to 64k (Closed)

Created:
7 years, 8 months ago by Roland McGrath
Modified:
7 years, 8 months ago
Reviewers:
Mark Seaborn, kmixter1
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/nacl-glibc.git@master
Visibility:
Public.

Description

Align and pad code segments to 64k Fiddle the linker scripts to ensure that the code segment starts and ends on a 64k boundary and the end is padded with valid instructions (nop). This is necessary to permit direct mapping of code segments from files. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3371 TEST= toolchain trybot and inspection of binaries R=mseaborn@chromium.org Committed: https://git.chromium.org/gitweb?p=native_client/nacl-glibc.git;a=commit;h=cd98ee3

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -40 lines) Patch
M nacl/dyn-link/ldscripts/elf64_nacl.x View 2 chunks +5 lines, -4 lines 0 comments Download
M nacl/dyn-link/ldscripts/elf64_nacl.xs View 3 chunks +5 lines, -16 lines 0 comments Download
M nacl/dyn-link/ldscripts/elf_nacl.x View 2 chunks +5 lines, -4 lines 0 comments Download
M nacl/dyn-link/ldscripts/elf_nacl.xs View 3 chunks +5 lines, -16 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Roland McGrath
7 years, 8 months ago (2013-04-05 19:52:38 UTC) #1
Mark Seaborn
LGTM, but please explain in the commit message that the reason for this is so ...
7 years, 8 months ago (2013-04-05 20:05:51 UTC) #2
Roland McGrath
Committed patchset #1 manually as rcd98ee3 (presubmit successful).
7 years, 8 months ago (2013-04-05 20:12:02 UTC) #3
kmixter1
Any reason not to do this for -static links too? (IOW, modify *.x.static linker scripts) ...
7 years, 8 months ago (2013-04-09 04:11:24 UTC) #4
Mark Seaborn
On 8 April 2013 21:11, <kmixter@chromium.org> wrote: > Any reason not to do this for ...
7 years, 8 months ago (2013-04-09 16:44:35 UTC) #5
kmixter1
7 years, 8 months ago (2013-04-09 20:43:24 UTC) #6
OK, my change still has the changes to x.static's and I took all of
Roland's changes to the others.  You're right - they're missing appropriate
padding out to keep the later sections from encroaching on the otherwise
potentially PROT_EXEC mappable page.  PTAL.


On Tue, Apr 9, 2013 at 9:44 AM, Mark Seaborn <mseaborn@chromium.org> wrote:

> On 8 April 2013 21:11, <kmixter@chromium.org> wrote:
>
>> Any reason not to do this for -static links too?  (IOW, modify *.x.static
>> linker
>> scripts)  I have this as part of a change I was cooking and not sure if I
>> should
>> land those for completeness or there's a reason not to.
>>
>
> I thought the *.static linker scripts already align and pad the code
> segments to 64k.  But maybe they align but don't NOP-pad?  In that case,
> yes, it would be good to change them too, although the static linking
> scripts for glibc are rarely used.
>
> Mark
>
>

-- 
You received this message because you are subscribed to the Google Groups
"Native-Client-Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to native-client-reviews+unsubscribe@googlegroups.com.
To post to this group, send email to native-client-reviews@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-reviews?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Powered by Google App Engine
This is Rietveld 408576698