This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: arbitrary ELF machine-code
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Nick Clifton'" <nickc at redhat dot com>, "'Alexander Voropay'" <a dot voropay at equant dot ru>
- Cc: <binutils at sources dot redhat dot com>
- Date: Fri, 17 Feb 2006 15:41:50 -0000
- Subject: RE: arbitrary ELF machine-code
On 17 February 2006 11:56, Nick Clifton wrote:
> Hi Alexander,
>
>> I have to setup an ELF machime-code to 0x1e for my specific platfirm .
>>
>> Unfortunately, I can't made this with `objcopy --alt-machine-code` option.
>> Tryed "--alt-machine-code 30" "--alt-machine-code 0x1e" e.t.c.
>
> What happens when you try this ? It should work. Can you include a
> *small* test case ?
>
> Cheers
> Nick
I noticed one minor glitch:
bfd/
2006-02-17 Dave Korn <dave.korn@artimi.com>
* objcopy.c (copy_main): Zero is positive too!
[ If that's a bit flippant, how about
* objcopy.c (copy_main): Allow zero in range of valid alt_mach codes.
]
Index: binutils/objcopy.c
===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.94
diff -p -u -r1.94 objcopy.c
--- binutils/objcopy.c 30 Jan 2006 13:06:53 -0000 1.94
+++ binutils/objcopy.c 17 Feb 2006 15:32:38 -0000
@@ -3070,7 +3070,7 @@ copy_main (int argc, char *argv[])
case OPTION_ALT_MACH_CODE:
use_alt_mach_code = atoi (optarg);
- if (use_alt_mach_code <= 0)
+ if (use_alt_mach_code < 0)
fatal (_("alternate machine code index must be positive"));
break;
cheers,
DaveK
--
Can't think of a witty .sigline today....