Commit | Line | Data |
---|---|---|
caa65211 L |
1 | PARSE_AND_LIST_OPTIONS_CALL_NOP=' |
2 | fprintf (file, _("\ | |
3 | -z call-nop=PADDING Use PADDING as 1-byte NOP for branch\n")); | |
4 | ' | |
5 | PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP=' | |
6 | else if (strncmp (optarg, "call-nop=", 9) == 0) | |
7 | { | |
8 | if (strcmp (optarg + 9, "prefix-addr") == 0) | |
9 | { | |
5b9c07b2 L |
10 | params.call_nop_as_suffix = FALSE; |
11 | params.call_nop_byte = 0x67; | |
caa65211 | 12 | } |
caa65211 L |
13 | else if (strcmp (optarg + 9, "suffix-nop") == 0) |
14 | { | |
5b9c07b2 L |
15 | params.call_nop_as_suffix = TRUE; |
16 | params.call_nop_byte = 0x90; | |
caa65211 L |
17 | } |
18 | else if (strncmp (optarg + 9, "prefix-", 7) == 0) | |
19 | { | |
20 | char *end; | |
5b9c07b2 | 21 | params.call_nop_byte = strtoul (optarg + 16 , &end, 0); |
caa65211 | 22 | if (*end) |
df5f2391 | 23 | einfo (_("%F%P: invalid number for -z call-nop=prefix-: %s\n"), |
caa65211 | 24 | optarg + 16); |
5b9c07b2 | 25 | params.call_nop_as_suffix = FALSE; |
caa65211 L |
26 | } |
27 | else if (strncmp (optarg + 9, "suffix-", 7) == 0) | |
28 | { | |
29 | char *end; | |
5b9c07b2 | 30 | params.call_nop_byte = strtoul (optarg + 16, &end, 0); |
caa65211 | 31 | if (*end) |
df5f2391 | 32 | einfo (_("%F%P: invalid number for -z call-nop=suffix-: %s\n"), |
caa65211 | 33 | optarg + 16); |
5b9c07b2 | 34 | params.call_nop_as_suffix = TRUE; |
caa65211 L |
35 | } |
36 | else | |
df5f2391 | 37 | einfo (_("%F%P: unsupported option: -z %s\n"), optarg); |
caa65211 L |
38 | } |
39 | ' | |
40 | ||
41 | PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_CALL_NOP" | |
42 | PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP" | |
43 | CALL_NOP_BYTE=0x67 |