[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/22829] New: objcopy/strip: PT_GNU_RELRO is removed when it
From: |
ngg at tresorit dot com |
Subject: |
[Bug binutils/22829] New: objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area |
Date: |
Sat, 10 Feb 2018 13:03:11 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22829
Bug ID: 22829
Summary: objcopy/strip: PT_GNU_RELRO is removed when it's not
at the beginning of a PT_LOAD area
Product: binutils
Version: 2.31 (HEAD)
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: ngg at tresorit dot com
Target Milestone: ---
The assign_file_positions_for_non_load_sections() function in bfd/elf.c removes
a PT_GNU_RELRO segment if there is no corresponding PT_LOAD segment. This check
is made by comparing the two segments' p_paddr fields for equality.
The lld linker can assign a single PT_LOAD for multiple sections even if only
some of those will be marked as relro. In this case the p_paddr fields do not
match and strip/objcopy wrongfully removes the PT_GNU_RELRO segment.
Unfortunately it's not that easy to fix because if the equality check is fixed
to recognize an overlapping PT_LOAD segment then that segment's parameters
(vaddr, paddr, offset, ...) override the PT_GNU_RELRO segment's parameters
which is not what we would want.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/22829] New: objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area,
ngg at tresorit dot com <=
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area, ngg at tresorit dot com, 2018/02/10
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area, hjl.tools at gmail dot com, 2018/02/10
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area, ngg at tresorit dot com, 2018/02/10
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area, amodra at gmail dot com, 2018/02/10
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not at the beginning of a PT_LOAD area, hjl.tools at gmail dot com, 2018/02/11
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not placed before read-only section, hjl.tools at gmail dot com, 2018/02/11
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not placed before read-only section, ngg at tresorit dot com, 2018/02/11
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not placed before read-only section, amodra at gmail dot com, 2018/02/11
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not placed before read-only section, ngg at tresorit dot com, 2018/02/12
- [Bug binutils/22829] objcopy/strip: PT_GNU_RELRO is removed when it's not placed before read-only section, amodra at gmail dot com, 2018/02/12