aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-06-05 23:52:21 +0000
committerCary Coutant <ccoutant@google.com>2013-06-05 23:52:21 +0000
commit7fb47cc9a4f7c7ca964f817f3c92947f1fbbf616 (patch)
treeb843a95740ea6ec79f286d50a3a9a826f3855259 /gold/layout.cc
parent69fc87c263bbfcb062d993d70ea1e97813cd3d29 (diff)
downloadgdb-7fb47cc9a4f7c7ca964f817f3c92947f1fbbf616.zip
gdb-7fb47cc9a4f7c7ca964f817f3c92947f1fbbf616.tar.gz
gdb-7fb47cc9a4f7c7ca964f817f3c92947f1fbbf616.tar.bz2
2013-06-05 Alexander Ivchenko <alexander.ivchenko@intel.com>
gold/ * layout.cc (Layout::set_segment_offsets): Taking care of the case when the maximum segment alignment is larger than the page size. * testsuite/Makefile.am (large_symbol_alignment): Test that Gold correctly aligns the symbols with large alignemnt. * testsuite/Makefile.in: Regenerate. * testsuite/large_symbol_alignment.cc: New file.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 65c3de6..818773a 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -3485,7 +3485,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