summaryrefslogtreecommitdiff
path: root/bfd/elf32-sparc.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2000-02-28 03:50:32 +0000
committerIan Lance Taylor <ian@airs.com>2000-02-28 03:50:32 +0000
commitee775361c7751e91621ac9d0dfbbbbc5cfa1bcf8 (patch)
treefeeb01000d7504b9fb258d90d1bbd7ca1f8d2427 /bfd/elf32-sparc.c
parent52d3008415dd6f757915a8c09a426e27b9e4cdc2 (diff)
downloadgdb-ee775361c7751e91621ac9d0dfbbbbc5cfa1bcf8.tar.gz
2000-02-27 Jakub Jelinek <jakub@redhat.com>
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump architecture if the object causing the bump is dynamic. * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise, and also don't it for memory ordering. (sparc64_elf_write_relocs): Take src_rela out of the loop.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r--bfd/elf32-sparc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index bf347827d09..f39fc1b5ec4 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1,5 +1,6 @@
/* SPARC-specific support for 32-bit ELF
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1871,8 +1872,11 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
(_("%s: compiled for a 64 bit system and target is 32 bit"),
bfd_get_filename (ibfd));
}
- else if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
- bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
+ else if ((ibfd->flags & DYNAMIC) == 0)
+ {
+ if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
+ bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
+ }
#endif
if (((elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA)