* objcopy -B (--binary-architecture=)bfdarch limited to 'binary' input
@ 2009-08-24 15:23 Philippe De Muyter
0 siblings, 0 replies; only message in thread
From: Philippe De Muyter @ 2009-08-24 15:23 UTC (permalink / raw)
To: binutils
Hello list,
I recently tried to use
objcopy -I srec -B m68k ...
to produce a elf file, but got this warning :
objcopy: Warning: input target 'binary' required for binary architecture parameter.
objcopy: Argument m68k ignored
I see no reason why converting from srec (and other architecture-less formats)
could not benefit also from the -B option.
Here is a patch squetch :
binutils/Changelog
2009-08-24 Philippe De Muyter <phdm@macqel.be>
* obcopy.c (copy_main): Accept `-B' (`--binary-architecture') option
also for 'srec' input.
Index: binutils/objcopy.c
===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.134
diff -p -U6 -r1.134 objcopy.c
--- binutils/objcopy.c 3 Aug 2009 13:47:35 -0000 1.134
+++ binutils/objcopy.c 24 Aug 2009 13:44:26 -0000
@@ -3822,13 +3822,15 @@ copy_main (int argc, char *argv[])
output_target = efi;
convert_efi_target (efi);
}
if (binary_architecture != NULL)
{
- if (input_target && strcmp (input_target, "binary") == 0)
+ if (input_target
+ && (strcmp (input_target, "binary") == 0
+ || strcmp (input_target, "srec") == 0))
{
const bfd_arch_info_type * temp_arch_info;
temp_arch_info = bfd_scan_arch (binary_architecture);
if (temp_arch_info != NULL)
@@ -3838,13 +3840,13 @@ copy_main (int argc, char *argv[])
}
else
fatal (_("architecture %s unknown"), binary_architecture);
}
else
{
- non_fatal (_("Warning: input target 'binary' required for binary architecture parameter."));
+ non_fatal (_("Warning: input target 'binary|srec' required for binary architecture parameter."));
non_fatal (_(" Argument %s ignored"), binary_architecture);
}
}
if (preserve_dates)
if (stat (input_filename, & statbuf) < 0)
comments ?
Philippe
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-24 13:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-24 15:23 objcopy -B (--binary-architecture=)bfdarch limited to 'binary' input Philippe De Muyter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).