mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
From Ralf Baechle <ralf@gnu.org> * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit BFDs containing no sections or empty .text, .data or .bss sections to be merged, regardless of their flags.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
|
||||||
|
|
||||||
|
From Ralf Baechle <ralf@gnu.org>
|
||||||
|
|
||||||
|
* elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
|
||||||
|
BFDs containing no sections or empty .text, .data or .bss sections
|
||||||
|
to be merged, regardless of their flags.
|
||||||
|
|
||||||
2000-12-06 Kazu Hirata <kazu@hxi.com>
|
2000-12-06 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
* elf32-m32r.c: Fix formatting.
|
* elf32-m32r.c: Fix formatting.
|
||||||
|
@ -2497,6 +2497,8 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
|
|||||||
flagword old_flags;
|
flagword old_flags;
|
||||||
flagword new_flags;
|
flagword new_flags;
|
||||||
boolean ok;
|
boolean ok;
|
||||||
|
boolean null_input_bfd = true;
|
||||||
|
asection *sec;
|
||||||
|
|
||||||
/* Check if we have the same endianess */
|
/* Check if we have the same endianess */
|
||||||
if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
|
if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
|
||||||
@ -2536,6 +2538,27 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
|
|||||||
if (new_flags == old_flags)
|
if (new_flags == old_flags)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
/* Check to see if the input BFD actually contains any sections.
|
||||||
|
If not, its flags may not have been initialised either, but it cannot
|
||||||
|
actually cause any incompatibility. */
|
||||||
|
for (sec = ibfd->sections; sec != NULL; sec = sec->next)
|
||||||
|
{
|
||||||
|
/* Ignore synthetic sections and empty .text, .data and .bss sections
|
||||||
|
which are automatically generated by gas. */
|
||||||
|
if (strcmp (sec->name, ".reginfo")
|
||||||
|
&& strcmp (sec->name, ".mdebug")
|
||||||
|
&& ((!strcmp (sec->name, ".text")
|
||||||
|
|| !strcmp (sec->name, ".data")
|
||||||
|
|| !strcmp (sec->name, ".bss"))
|
||||||
|
&& sec->_raw_size != 0))
|
||||||
|
{
|
||||||
|
null_input_bfd = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (null_input_bfd)
|
||||||
|
return true;
|
||||||
|
|
||||||
ok = true;
|
ok = true;
|
||||||
|
|
||||||
if ((new_flags & EF_MIPS_PIC) != (old_flags & EF_MIPS_PIC))
|
if ((new_flags & EF_MIPS_PIC) != (old_flags & EF_MIPS_PIC))
|
||||||
|
Reference in New Issue
Block a user