bfd/
PR 6789 * elf.c (assign_file_positions_for_load_sections): Call _bfd_elf_map_sections_to_segments, not elf_modify_segment_map. (get_program_header_size): Protect against NULL info. (_bfd_elf_map_sections_to_segments): Likewise. * elf32-spu.c (spu_elf_additional_program_headers): Likewise. ld/testsuite/ * ld-elf/extract-symbol-1sec.d: Correct section lma.
This commit is contained in:
parent
b8a4873487
commit
ceae84aacf
@ -1,3 +1,12 @@
|
|||||||
|
2008-09-29 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
PR 6789
|
||||||
|
* elf.c (assign_file_positions_for_load_sections): Call
|
||||||
|
_bfd_elf_map_sections_to_segments, not elf_modify_segment_map.
|
||||||
|
(get_program_header_size): Protect against NULL info.
|
||||||
|
(_bfd_elf_map_sections_to_segments): Likewise.
|
||||||
|
* elf32-spu.c (spu_elf_additional_program_headers): Likewise.
|
||||||
|
|
||||||
2008-09-29 Nick Clifton <nickc@redhat.com>
|
2008-09-29 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* po/vi.po: Updated Vietnamese translation.
|
* po/vi.po: Updated Vietnamese translation.
|
||||||
@ -16,7 +25,8 @@
|
|||||||
|
|
||||||
2008-09-17 Bob Wilson <bob.wilson@acm.org>
|
2008-09-17 Bob Wilson <bob.wilson@acm.org>
|
||||||
|
|
||||||
* elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative refcount.
|
* elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative
|
||||||
|
refcount.
|
||||||
|
|
||||||
2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
15
bfd/elf.c
15
bfd/elf.c
@ -3380,7 +3380,7 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
|
|||||||
++segs;
|
++segs;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->relro)
|
if (info != NULL && info->relro)
|
||||||
{
|
{
|
||||||
/* We need a PT_GNU_RELRO segment. */
|
/* We need a PT_GNU_RELRO segment. */
|
||||||
++segs;
|
++segs;
|
||||||
@ -3762,8 +3762,13 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allow interested parties a chance to override our decision. */
|
/* Allow interested parties a chance to override our decision. */
|
||||||
if (last_hdr && info->callbacks->override_segment_assignment)
|
if (last_hdr != NULL
|
||||||
new_segment = info->callbacks->override_segment_assignment (info, abfd, hdr, last_hdr, new_segment);
|
&& info != NULL
|
||||||
|
&& info->callbacks->override_segment_assignment != NULL)
|
||||||
|
new_segment
|
||||||
|
= info->callbacks->override_segment_assignment (info, abfd, hdr,
|
||||||
|
last_hdr,
|
||||||
|
new_segment);
|
||||||
|
|
||||||
if (! new_segment)
|
if (! new_segment)
|
||||||
{
|
{
|
||||||
@ -3938,7 +3943,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
|
|||||||
pm = &m->next;
|
pm = &m->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->relro)
|
if (info != NULL && info->relro)
|
||||||
{
|
{
|
||||||
for (m = mfirst; m != NULL; m = m->next)
|
for (m = mfirst; m != NULL; m = m->next)
|
||||||
{
|
{
|
||||||
@ -4122,7 +4127,7 @@ assign_file_positions_for_load_sections (bfd *abfd,
|
|||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
if (link_info == NULL
|
if (link_info == NULL
|
||||||
&& !elf_modify_segment_map (abfd, link_info, FALSE))
|
&& !_bfd_elf_map_sections_to_segments (abfd, link_info))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
alloc = 0;
|
alloc = 0;
|
||||||
|
@ -4245,10 +4245,15 @@ spu_elf_post_process_headers (bfd *abfd,
|
|||||||
static int
|
static int
|
||||||
spu_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info)
|
spu_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info)
|
||||||
{
|
{
|
||||||
struct spu_link_hash_table *htab = spu_hash_table (info);
|
int extra = 0;
|
||||||
int extra = htab->num_overlays;
|
|
||||||
asection *sec;
|
asection *sec;
|
||||||
|
|
||||||
|
if (info != NULL)
|
||||||
|
{
|
||||||
|
struct spu_link_hash_table *htab = spu_hash_table (info);
|
||||||
|
extra = htab->num_overlays;
|
||||||
|
}
|
||||||
|
|
||||||
if (extra)
|
if (extra)
|
||||||
++extra;
|
++extra;
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2008-09-29 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* ld-elf/extract-symbol-1sec.d: Correct section lma.
|
||||||
|
|
||||||
2008-09-25 Alan Modra <amodra@bigpond.net.au>
|
2008-09-25 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* ld-elf/eh-group.exp: Only run on ELF targets.
|
* ld-elf/eh-group.exp: Only run on ELF targets.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#...
|
#...
|
||||||
Sections:
|
Sections:
|
||||||
*Idx +Name +Size +VMA +LMA .*
|
*Idx +Name +Size +VMA +LMA .*
|
||||||
*0 +\.foo +0+ +0+10000 +0+10000 .*
|
*0 +\.foo +0+ +0+10000 +0+ .*
|
||||||
*CONTENTS, ALLOC, LOAD, CODE
|
*CONTENTS, ALLOC, LOAD, CODE
|
||||||
*1 +\.bar +0+ +0+20000 +0+20000 .*
|
*1 +\.bar +0+ +0+20000 +0+10000 .*
|
||||||
*ALLOC, READONLY, CODE
|
*ALLOC, READONLY, CODE
|
||||||
|
Loading…
Reference in New Issue
Block a user