PR 6494
* elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO p_filesz and p_memsz are equal. Use p_memsz as the segment size. (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO if we don't find matching PT_LOAD when copying.
This commit is contained in:
parent
0cc9e1d385
commit
9433b9b16e
|
@ -1,3 +1,11 @@
|
||||||
|
2009-03-26 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
PR 6494
|
||||||
|
* elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
|
||||||
|
p_filesz and p_memsz are equal. Use p_memsz as the segment size.
|
||||||
|
(assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
|
||||||
|
if we don't find matching PT_LOAD when copying.
|
||||||
|
|
||||||
2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||||
|
|
||||||
* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
|
* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
|
||||||
|
|
|
@ -4683,13 +4683,11 @@ assign_file_positions_for_non_load_sections (bfd *abfd,
|
||||||
p->p_align = 1;
|
p->p_align = 1;
|
||||||
p->p_flags = (lp->p_flags & ~PF_W);
|
p->p_flags = (lp->p_flags & ~PF_W);
|
||||||
}
|
}
|
||||||
else if (link_info != NULL)
|
else
|
||||||
{
|
{
|
||||||
memset (p, 0, sizeof *p);
|
memset (p, 0, sizeof *p);
|
||||||
p->p_type = PT_NULL;
|
p->p_type = PT_NULL;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
abort ();
|
|
||||||
}
|
}
|
||||||
else if (m->count != 0)
|
else if (m->count != 0)
|
||||||
{
|
{
|
||||||
|
@ -5838,14 +5836,13 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
|
||||||
map->p_align_valid = 1;
|
map->p_align_valid = 1;
|
||||||
map->p_vaddr_offset = 0;
|
map->p_vaddr_offset = 0;
|
||||||
|
|
||||||
if (map->p_type == PT_GNU_RELRO
|
if (map->p_type == PT_GNU_RELRO)
|
||||||
&& segment->p_filesz == segment->p_memsz)
|
|
||||||
{
|
{
|
||||||
/* The PT_GNU_RELRO segment may contain the first a few
|
/* The PT_GNU_RELRO segment may contain the first a few
|
||||||
bytes in the .got.plt section even if the whole .got.plt
|
bytes in the .got.plt section even if the whole .got.plt
|
||||||
section isn't in the PT_GNU_RELRO segment. We won't
|
section isn't in the PT_GNU_RELRO segment. We won't
|
||||||
change the size of the PT_GNU_RELRO segment. */
|
change the size of the PT_GNU_RELRO segment. */
|
||||||
map->p_size = segment->p_filesz;
|
map->p_size = segment->p_memsz;
|
||||||
map->p_size_valid = 1;
|
map->p_size_valid = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue