* objcopy.c (use_alt_mach_code): Change type to unsigned long.

(copy_object):  If bfd_alt_mach_code fails emit a more helpful message
   and if the target architecture is ELF use the alternative as replacement
   value for the e_machine number.
   (copy_main): Use strtoul to parse the number provided with the
   --alt-mach-code switch.
* doc/binutils.texi (--alt-mach-code): Document that this switch can now
    set the absolute e_machine value.
This commit is contained in:
Nick Clifton
2006-02-28 16:09:01 +00:00
parent 9f6f925e1e
commit f9d4ad2a13
3 changed files with 35 additions and 10 deletions

View File

@@ -1399,7 +1399,9 @@ If the output architecture has alternate machine codes, use the
@var{index}th code instead of the default one. This is useful in case
a machine is assigned an official code and the tool-chain adopts the
new code, but other applications still depend on the original code
being used.
being used. For ELF based architectures if the @var{index}
alternative does not exist then the value is treated as an absolute
number to be stored in the e_machine field of the ELF header.
@item --writable-text
Mark the output text as writable. This option isn't meaningful for all