diff --git a/gold/ChangeLog b/gold/ChangeLog index 93529fe536..1e73aa8eff 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2015-01-09 Cary Coutant + + * layout.cc (Layout::set_segment_offsets): Don't align start of segment + unless alignment is larger than page size. + 2015-01-06 H.J. Lu Cary Coutant diff --git a/gold/layout.cc b/gold/layout.cc index acc03b21e1..bcdaac825d 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)