aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index acc03b2..bcdaac8 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -3524,7 +3524,9 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg,
// put them on different pages in memory. We will revisit this
// decision once we know the size of the segment.
- addr = align_address(addr, (*p)->maximum_alignment());
+ uint64_t max_align = (*p)->maximum_alignment();
+ if (max_align > abi_pagesize)
+ addr = align_address(addr, max_align);
aligned_addr = addr;
if (load_seg == *p)