diff options
author | Ian Lance Taylor <iant@google.com> | 2007-08-21 21:03:50 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-08-21 21:03:50 +0000 |
commit | 0496d5e5b46976aa1cdbe55c6e833a6e7a04961d (patch) | |
tree | 7fc5c2f7d3c95a5ceba847de4d3587bcaf0ff16d /gold/layout.cc | |
parent | 41f542e70b89b9ea2875c438b0c9a60ac46092dd (diff) | |
download | gdb-0496d5e5b46976aa1cdbe55c6e833a6e7a04961d.zip gdb-0496d5e5b46976aa1cdbe55c6e833a6e7a04961d.tar.gz gdb-0496d5e5b46976aa1cdbe55c6e833a6e7a04961d.tar.bz2 |
Force PT_LOAD segments to be aligned to the page size.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 2f85db4..1e8df22 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -610,6 +610,10 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg, uint64_t aligned_addr = addr; uint64_t abi_pagesize = target->abi_pagesize(); + + // FIXME: This should depend on the -n and -N options. + (*p)->set_minimum_addralign(target->common_pagesize()); + if (was_readonly && ((*p)->flags() & elfcpp::PF_W) != 0) { uint64_t align = (*p)->addralign(); |