diff options
author | H.J. Lu <hjl@lucon.org> | 2002-02-06 21:34:17 +0000 |
---|---|---|
committer | H.J. Lu <hjl@lucon.org> | 2002-02-06 21:34:17 +0000 |
commit | 2d02d5c14af3c06d247a63a45dc5cab33dd6c93d (patch) | |
tree | 7e2d80a5787c978a3fa501313e9a7f84c9702d76 | |
parent | 94454c961210907bf2d81a887dba5f78ff48c386 (diff) | |
download | gdb-2d02d5c14af3c06d247a63a45dc5cab33dd6c93d.tar.gz |
2002-02-06 H.J. Lu (hjl@gnu.org)
* elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
the mach and ISA fields if necessary.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-mips.c | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6f2764be7db..c3bf16d71fe 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-02-06 H.J. Lu (hjl@gnu.org) + + * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update + the mach and ISA fields if necessary. + 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com> * coffcode.h (coff_set_arch_mach_hook): Select the highest known diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index a84112ef8dd..479ab75defc 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -3169,8 +3169,21 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd) bfd_archive_filename (ibfd), new_isa, old_isa); ok = false; } - } + else + { + /* Do we need to update the mach field? */ + if (old_mach == 0 && new_mach != 0) + elf_elfheader (obfd)->e_flags |= new_mach; + /* Do we need to update the ISA field? */ + if (new_isa > old_isa) + { + elf_elfheader (obfd)->e_flags &= ~EF_MIPS_ARCH; + elf_elfheader (obfd)->e_flags + |= new_flags & EF_MIPS_ARCH; + } + } + } else { (*_bfd_error_handler) |