mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
* elflink.c (bfd_elf_final_link): Don't free symbuf for
non-elf input bfds. (bfd_elf_size_dynamic_sections): Don't access elf_section_data for non-elf input bfds.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2007-04-14 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* elflink.c (bfd_elf_final_link): Don't free symbuf for
|
||||||
|
non-elf input bfds.
|
||||||
|
(bfd_elf_size_dynamic_sections): Don't access elf_section_data
|
||||||
|
for non-elf input bfds.
|
||||||
|
|
||||||
2007-04-12 Richard Sandiford <richard@codesourcery.com>
|
2007-04-12 Richard Sandiford <richard@codesourcery.com>
|
||||||
|
|
||||||
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
|
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
|
||||||
|
@ -5522,15 +5522,16 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
|
|||||||
|
|
||||||
for (sub = info->input_bfds; sub != NULL;
|
for (sub = info->input_bfds; sub != NULL;
|
||||||
sub = sub->link_next)
|
sub = sub->link_next)
|
||||||
for (o = sub->sections; o != NULL; o = o->next)
|
if (bfd_get_flavour (sub) == bfd_target_elf_flavour)
|
||||||
if (elf_section_data (o)->this_hdr.sh_type
|
for (o = sub->sections; o != NULL; o = o->next)
|
||||||
== SHT_PREINIT_ARRAY)
|
if (elf_section_data (o)->this_hdr.sh_type
|
||||||
{
|
== SHT_PREINIT_ARRAY)
|
||||||
(*_bfd_error_handler)
|
{
|
||||||
(_("%B: .preinit_array section is not allowed in DSO"),
|
(*_bfd_error_handler)
|
||||||
sub);
|
(_("%B: .preinit_array section is not allowed in DSO"),
|
||||||
break;
|
sub);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
bfd_set_error (bfd_error_nonrepresentable_section);
|
bfd_set_error (bfd_error_nonrepresentable_section);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -9533,7 +9534,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
|
|||||||
if (!info->reduce_memory_overheads)
|
if (!info->reduce_memory_overheads)
|
||||||
{
|
{
|
||||||
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
|
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
|
||||||
if (elf_tdata (sub)->symbuf)
|
if (bfd_get_flavour (sub) == bfd_target_elf_flavour
|
||||||
|
&& elf_tdata (sub)->symbuf)
|
||||||
{
|
{
|
||||||
free (elf_tdata (sub)->symbuf);
|
free (elf_tdata (sub)->symbuf);
|
||||||
elf_tdata (sub)->symbuf = NULL;
|
elf_tdata (sub)->symbuf = NULL;
|
||||||
|
Reference in New Issue
Block a user