diff options
Diffstat (limited to 'binutils-2.22/gold/layout.cc')
-rw-r--r-- | binutils-2.22/gold/layout.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/binutils-2.22/gold/layout.cc b/binutils-2.22/gold/layout.cc index fbad2723..fb53c217 100644 --- a/binutils-2.22/gold/layout.cc +++ b/binutils-2.22/gold/layout.cc @@ -3327,7 +3327,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 { // This is -N or -n with a section script which prevents |