aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-10-13 16:18:56 +1030
committerAlan Modra <amodra@gmail.com>2015-10-13 16:23:13 +1030
commit341b8ee719163f7ae8528f2a7832381887fbf8d8 (patch)
tree94d65561cb1a93b9cbb7a2cc5df0d9436efe1f5e /bfd
parent8173c2a3c46efd8b12983b6095ff7bed4cda1c90 (diff)
downloadgdb-341b8ee719163f7ae8528f2a7832381887fbf8d8.zip
gdb-341b8ee719163f7ae8528f2a7832381887fbf8d8.tar.gz
gdb-341b8ee719163f7ae8528f2a7832381887fbf8d8.tar.bz2
Tidy code setting PT_GNU_RELRO p_flags
No functional changes here. * elf.c (_bfd_elf_map_sections_to_segments): Don't set PT_GNU_RELRO p_flags. (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO flags to PF_R here.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf.c5
2 files changed, 8 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index abcddc9..6cd68de 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-13 Alan Modra <amodra@gmail.com>
+
+ * elf.c (_bfd_elf_map_sections_to_segments): Don't set
+ PT_GNU_RELRO p_flags.
+ (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
+ flags to PF_R here.
+
2015-10-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/19073
diff --git a/bfd/elf.c b/bfd/elf.c
index 6c878bd..7f38fa0 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4646,9 +4646,6 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
goto error_return;
m->next = NULL;
m->p_type = PT_GNU_RELRO;
- m->p_flags = PF_R;
- m->p_flags_valid = 1;
-
*pm = m;
pm = &m->next;
}
@@ -5480,7 +5477,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd,
if (!m->p_align_valid)
p->p_align = 1;
if (!m->p_flags_valid)
- p->p_flags = (lp->p_flags & ~PF_W);
+ p->p_flags = PF_R;
}
else
{