mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
2012-05-08 Ben Cheng <bccheng@google.com>
* bfd/elf.c: Preserve the original p_align and p_flags if they are valid.
This commit is contained in:
parent
c0749c4da2
commit
2d16d28e5c
@ -1,3 +1,8 @@
|
||||
2012-05-08 Ben Cheng <bccheng@google.com>
|
||||
|
||||
* bfd/elf.c: Preserve the original p_align and p_flags if they are
|
||||
valid.
|
||||
|
||||
2012-05-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
|
||||
|
10
bfd/elf.c
10
bfd/elf.c
@ -4931,8 +4931,14 @@ assign_file_positions_for_non_load_sections (bfd *abfd,
|
||||
else
|
||||
abort ();
|
||||
p->p_memsz = p->p_filesz;
|
||||
p->p_align = 1;
|
||||
p->p_flags = (lp->p_flags & ~PF_W);
|
||||
/* Preserve the alignment and flags if they are valid. The gold
|
||||
linker generates RW/4 for the PT_GNU_RELRO section. It is better
|
||||
for objcopy/strip to honor these attributes otherwise gdb will
|
||||
choke when using separate debug files. */
|
||||
if (!m->p_align_valid)
|
||||
p->p_align = 1;
|
||||
if (!m->p_flags_valid)
|
||||
p->p_flags = (lp->p_flags & ~PF_W);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user