Do not initialise flags in output bfd if the input bfd is the default

architecture with the default flags.
This commit is contained in:
Nick Clifton 2000-09-09 00:40:08 +00:00
parent d70910e85d
commit fe077fa645
2 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2000-09-08 Nick Clifton <nickc@redhat.com>
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
initialise flags in output bfd if the input bfd is the default
architecture with the default flags.
2000-09-08 Kazu Hirata <kazu@hxi.com> 2000-09-08 Kazu Hirata <kazu@hxi.com>
* archive.c: Fix formatting. * archive.c: Fix formatting.

View file

@ -2038,13 +2038,14 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
if (!elf_flags_init (obfd)) if (!elf_flags_init (obfd))
{ {
/* If the input is the default architecture then do not /* If the input is the default architecture and had the default
bother setting the flags for the output architecture, flags then do not bother setting the flags for the output
instead allow future merges to do this. If no future architecture, instead allow future merges to do this. If no
merges ever set these flags then they will retain their future merges ever set these flags then they will retain their
unitialised values, which surprise surprise, correspond uninitialised values, which surprise surprise, correspond
to the default values. */ to the default values. */
if (bfd_get_arch_info (ibfd)->the_default) if (bfd_get_arch_info (ibfd)->the_default
&& elf_elfheader (ibfd)->e_flags == 0)
return true; return true;
elf_flags_init (obfd) = true; elf_flags_init (obfd) = true;