[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/16323] strip changes PT_LOAD segment generated by gold
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug binutils/16323] strip changes PT_LOAD segment generated by gold |
Date: |
Wed, 08 Jan 2014 14:01:08 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=16323
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 43a8475ca01b676fb764aaed0c4ed1cc16fc3c87 (commit)
from 221fd5d598e7dcf7b953150986a501b462b99891 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=43a8475ca01b676fb764aaed0c4ed1cc16fc3c87
commit 43a8475ca01b676fb764aaed0c4ed1cc16fc3c87
Author: H.J. Lu <address@hidden>
Date: Thu Dec 12 10:35:47 2013 -0800
Adjust LOAD segment to generate GNU_RELRO segment
This patch fixes 2 GNU_RELRO segment bugs:
1. lang_size_sections didn't properly align base to the maximum
alignment power of sections between DATA_SEGMENT_ALIGN and
DATA_SEGMENT_RELRO_END.
2. ld failed to adjust LOAD segment to generate GNU_RELRO segment
when LOAD segment doesn't fit GNU_RELRO segment. This is
https://sourceware.org/bugzilla/show_bug.cgi?id=14207
We "fixed" ld by not generating GNU_RELRO segment. This patch
adjusts LOAD segment to generate GNU_RELRO segment. It fixes
PR ld/16322 and at the same time it also fixes PR binutils/16323
since now we can adjust LOAD segment if it is too small.
bfd/
PR ld/14207
PR ld/16322
PR binutils/16323
* elf.c (_bfd_elf_map_sections_to_segments): Don't check section
size for PT_GNU_RELRO segment.
(assign_file_positions_for_load_sections): If PT_LOAD segment
doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
ld/
PR ld/14207
PR ld/16322
PR binutils/16323
* ldlang.c (lang_size_sections): Properly align RELRO base.
ld/testsuite/
PR ld/14207
PR ld/16322
PR binutils/16323
* ld-elf/pr16322.d: New file.
* ld-elf/pr16322.s: Likewise.
* ld-x86-64/pr14207.d: Expect PT_GNU_RELRO segment.
-----------------------------------------------------------------------
Summary of changes:
bfd/ChangeLog | 10 +++++++++
bfd/elf.c | 41 +++++++++++++++++++++++++++++++++----
ld/ChangeLog | 7 ++++++
ld/ldlang.c | 3 +-
ld/testsuite/ChangeLog | 10 +++++++++
ld/testsuite/ld-elf/pr16322.d | 7 ++++++
ld/testsuite/ld-elf/pr16322.s | 6 +++++
ld/testsuite/ld-x86-64/pr14207.d | 23 +++++++++++++++++---
8 files changed, 97 insertions(+), 10 deletions(-)
create mode 100644 ld/testsuite/ld-elf/pr16322.d
create mode 100644 ld/testsuite/ld-elf/pr16322.s
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/16323] strip changes PT_LOAD segment generated by gold,
cvs-commit at gcc dot gnu.org <=