Skip to content

Commit

Permalink
arm: prevent 64K default alignment of text segment
Browse files Browse the repository at this point in the history
  • Loading branch information
nfeske committed Jul 15, 2016
1 parent 2cbef82 commit 2127c8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions repos/base/mk/spec/arm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ SPECS += 32bit
#
CC_OPT += -Wno-psabi

#
# By default, the linker produces ELF binaries where the test segment is
# aligned to the largest page size. On ARM this is 64K. As a result, the
# produced binaries contain almost 64K zeros preceding the text segment.
# The patch enforces the text segment to be aligned to 4K instead.
#
LD_MARCH += -z max-page-size=0x1000

include $(call select_from_repositories,mk/spec/32bit.mk)

2 comments on commit 2127c8a

@chelmuth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With 11c31c4 I tried to enforce this command-line option for all platforms. Do you know why it does not work in your case?

@nfeske
Copy link
Member Author

@nfeske nfeske commented on 2127c8a Aug 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admittedly, I was not aware of your commit but found my one on an experimental (memory footprint experiments) of mine. Both commits are from June 2015. I can vaguely remember our discussion back then. You have certainly crafted your fix as a proper response for it. It supersedes my orignal patch. So we should better revert mine. Thanks for your careful review!

Please sign in to comment.