Remove some gotos from Python
[deliverable/binutils-gdb.git] / ld / emulparams / call_nop.sh
CommitLineData
caa65211
L
1PARSE_AND_LIST_OPTIONS_CALL_NOP='
2 fprintf (file, _("\
3 -z call-nop=PADDING Use PADDING as 1-byte NOP for branch\n"));
4'
5PARSE_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 {
10 link_info.call_nop_as_suffix = FALSE;
11 link_info.call_nop_byte = 0x67;
12 }
13 else if (strcmp (optarg + 9, "prefix-nop") == 0)
14 {
15 link_info.call_nop_as_suffix = FALSE;
16 link_info.call_nop_byte = 0x90;
17 }
18 else if (strcmp (optarg + 9, "suffix-nop") == 0)
19 {
20 link_info.call_nop_as_suffix = TRUE;
21 link_info.call_nop_byte = 0x90;
22 }
23 else if (strncmp (optarg + 9, "prefix-", 7) == 0)
24 {
25 char *end;
26 link_info.call_nop_byte = strtoul (optarg + 16 , &end, 0);
27 if (*end)
28 einfo (_("%P%F: invalid number for -z call-nop=prefix-: %s\n"),
29 optarg + 16);
30 link_info.call_nop_as_suffix = FALSE;
31 }
32 else if (strncmp (optarg + 9, "suffix-", 7) == 0)
33 {
34 char *end;
35 link_info.call_nop_byte = strtoul (optarg + 16, &end, 0);
36 if (*end)
37 einfo (_("%P%F: invalid number for -z call-nop=suffix-: %s\n"),
38 optarg + 16);
39 link_info.call_nop_as_suffix = TRUE;
40 }
41 else
42 einfo (_("%P%F: unsupported option: -z %s\n"), optarg);
43 }
44'
45
46PARSE_AND_LIST_OPTIONS="$PARSE_AND_LIST_OPTIONS $PARSE_AND_LIST_OPTIONS_CALL_NOP"
47PARSE_AND_LIST_ARGS_CASE_Z="$PARSE_AND_LIST_ARGS_CASE_Z $PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP"
48CALL_NOP_BYTE=0x67
This page took 0.075993 seconds and 4 git commands to generate.