summaryrefslogtreecommitdiffstats
path: root/binutils-2.21/gold/layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.21/gold/layout.cc')
-rw-r--r--binutils-2.21/gold/layout.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/binutils-2.21/gold/layout.cc b/binutils-2.21/gold/layout.cc
index 0bb3abb..14100a9 100644
--- a/binutils-2.21/gold/layout.cc
+++ b/binutils-2.21/gold/layout.cc
@@ -2962,7 +2962,13 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg,
if (!parameters->options().nmagic()
&& !parameters->options().omagic())
- off = align_file_offset(off, addr, abi_pagesize);
+ {
+ // Here we are also taking care of the case when
+ // the maximum segment alignment is larger than the page size.
+ off = align_file_offset(off, addr,
+ std::max(abi_pagesize,
+ (*p)->maximum_alignment()));
+ }
else if (load_seg == NULL)
{
// This is -N or -n with a section script which prevents