Implement tp_richcompare for gdb.Block
[binutils-gdb.git] / ld / emulparams / call_nop.sh
blob2c3c305f0e8b51ba730f7b08cc5964cc90eaaf1c
1 PARSE_AND_LIST_OPTIONS_CALL_NOP='
2 fprintf (file, _("\
3 -z call-nop=PADDING Use PADDING as 1-byte NOP for branch\n"));
5 PARSE_AND_LIST_ARGS_CASE_Z_CALL_NOP='
6 else if (strncmp (optarg, "call-nop=", 9) == 0)
8 if (strcmp (optarg + 9, "prefix-addr") == 0)
10 params.call_nop_as_suffix = false;
11 params.call_nop_byte = 0x67;
13 else if (strcmp (optarg + 9, "suffix-nop") == 0)
15 params.call_nop_as_suffix = true;
16 params.call_nop_byte = 0x90;
18 else if (strncmp (optarg + 9, "prefix-", 7) == 0)
20 char *end;
21 params.call_nop_byte = strtoul (optarg + 16 , &end, 0);
22 if (*end)
23 einfo (_("%F%P: invalid number for -z call-nop=prefix-: %s\n"),
24 optarg + 16);
25 params.call_nop_as_suffix = false;
27 else if (strncmp (optarg + 9, "suffix-", 7) == 0)
29 char *end;
30 params.call_nop_byte = strtoul (optarg + 16, &end, 0);
31 if (*end)
32 einfo (_("%F%P: invalid number for -z call-nop=suffix-: %s\n"),
33 optarg + 16);
34 params.call_nop_as_suffix = true;
36 else
37 einfo (_("%F%P: unsupported option: -z %s\n"), optarg);
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