diff options
author | Alan Modra <amodra@gmail.com> | 2012-09-10 23:10:41 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-09-10 23:10:41 +0000 |
commit | 815a120572fd0025c606dbb0b7ab5d137d07d036 (patch) | |
tree | e19cbdce076c9e977eb83d8ca5132dd115907008 /gold/layout.cc | |
parent | bd73a62d774b7c9a77be60ccfc4ff0dd7641970f (diff) | |
download | gdb-815a120572fd0025c606dbb0b7ab5d137d07d036.zip gdb-815a120572fd0025c606dbb0b7ab5d137d07d036.tar.gz gdb-815a120572fd0025c606dbb0b7ab5d137d07d036.tar.bz2 |
PR gold/14566
* layout.cc (Layout::set_segment_offsets): When using
common-page-size alignment, ensure we are on a new max-page-size
page.
* output.cc (Output_segment::set_section_addresses): Use
abi_pagesize, not common_pagesize for relro boundary.
(Output_segment::set_offset): Likewise.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 808dd94..86e39eb 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -3420,6 +3420,8 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg, *pshndx = shndx_hold; addr = align_address(aligned_addr, common_pagesize); addr = align_address(addr, (*p)->maximum_alignment()); + if ((addr & (abi_pagesize - 1)) != 0) + addr = addr + abi_pagesize; off = orig_off + ((addr - orig_addr) & (abi_pagesize - 1)); off = align_file_offset(off, addr, abi_pagesize); |