aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-10-21 14:08:12 +0000
committerNick Clifton <nickc@redhat.com>2003-10-21 14:08:12 +0000
commitb749473bc4c4e05436f3b07d464b0a172af761cf (patch)
tree8391b9890e176efe82354c4a1969de9f3ee968c4 /binutils
parent3e602632663c14cea25d8b12d1306eccbc1c9be3 (diff)
downloadgdb-b749473bc4c4e05436f3b07d464b0a172af761cf.zip
gdb-b749473bc4c4e05436f3b07d464b0a172af761cf.tar.gz
gdb-b749473bc4c4e05436f3b07d464b0a172af761cf.tar.bz2
Set the machine number as well as the architecture when converting from a
binary file to another file type.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/objcopy.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6ee23c4..02d6944 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-14 Anil Paranjpe <anilp1@KPITCummins.com>
+
+ * objcopy.c (copy_main): Reads machine flags from arch_info
+ structure.
+
2003-10-20 Andrew Cagney <cagney@redhat.com>
* coffgrok.h (coff_section): Replace 'struct sec" with "struct
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index c651221..b48b84f 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -351,8 +351,10 @@ extern unsigned int Chunk;
on by the --srec-forceS3 command line switch. */
extern bfd_boolean S3Forced;
-/* Defined in bfd/binary.c. Used to set architecture of input binary files. */
-extern enum bfd_architecture bfd_external_binary_architecture;
+/* Defined in bfd/binary.c. Used to set architecture and machine of input
+ binary files. */
+extern enum bfd_architecture bfd_external_binary_architecture;
+extern unsigned long bfd_external_machine;
/* Forward declarations. */
static void setup_section (bfd *, asection *, void *);
@@ -2769,7 +2771,10 @@ copy_main (int argc, char *argv[])
temp_arch_info = bfd_scan_arch (binary_architecture);
if (temp_arch_info != NULL)
- bfd_external_binary_architecture = temp_arch_info->arch;
+ {
+ bfd_external_binary_architecture = temp_arch_info->arch;
+ bfd_external_machine = temp_arch_info->mach;
+ }
else
fatal (_("architecture %s unknown"), binary_architecture);
}