aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2005-12-27 17:47:42 +0000
committerNathan Sidwell <nathan@codesourcery.com>2005-12-27 17:47:42 +0000
commite510ff97286cbe31248a5042fce1a18b82d95563 (patch)
tree0c7bdc581f9ec72b5cfe198a950b5c5226d22b4d /bfd
parentb59bea8a131efbbebfc273c3a66ba4cb8c657d8d (diff)
downloadgdb-e510ff97286cbe31248a5042fce1a18b82d95563.zip
gdb-e510ff97286cbe31248a5042fce1a18b82d95563.tar.gz
gdb-e510ff97286cbe31248a5042fce1a18b82d95563.tar.bz2
* elf32-mt.c (mt_elf_merge_private_bfd_data): Do not allow mixing
object files from different mt variants.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-mt.c17
2 files changed, 10 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e3bbd96..92a9b3d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-27 Nathan Sidwell <nathan@codesourcery.com>
+
+ * elf32-mt.c (mt_elf_merge_private_bfd_data): Do not allow mixing
+ object files from different mt variants.
+
2005-12-27 Leif Ekblad <leif@rdos.net>
* config.bfd: Add support for RDOS targets.
diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c
index 9f240bb..320ef1e 100644
--- a/bfd/elf32-mt.c
+++ b/bfd/elf32-mt.c
@@ -548,7 +548,7 @@ static bfd_boolean
mt_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
{
flagword old_flags, new_flags;
- bfd_boolean error = FALSE;
+ bfd_boolean ok = TRUE;
/* Check if we have the same endianess. */
if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
@@ -578,23 +578,16 @@ mt_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
{
/* CPU has changed. This is invalid, because MRISC, MRISC2 and
MS2 are not subsets of each other. */
- error = 1;
-
- /* FIXME:However, until the compiler is multilibbed, preventing
- mixing breaks the build. So we allow merging and use the
- greater CPU value. This is of course unsafe. */
- error = 0;
- if ((new_flags & EF_MT_CPU_MASK) > (old_flags & EF_MT_CPU_MASK))
- old_flags = ((old_flags & ~EF_MT_CPU_MASK)
- | (new_flags & EF_MT_CPU_MASK));
+ ok = FALSE;
}
- if (!error)
+
+ if (ok)
{
obfd->arch_info = ibfd->arch_info;
elf_elfheader (obfd)->e_flags = old_flags;
}
- return !error;
+ return ok;
}
static bfd_boolean