diff options
author | Nick Clifton <nickc@redhat.com> | 1999-05-29 10:57:44 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-05-29 10:57:44 +0000 |
commit | 7ca69e9e10ef290eb3dd62a1e6bebbe4c87fa202 (patch) | |
tree | eed2810ad42958114b49aa8ef5dbd19983016b5e /ld/emultempl | |
parent | ab5e779453ef98198abfc1f0b6ae1033601548ea (diff) | |
download | gdb-7ca69e9e10ef290eb3dd62a1e6bebbe4c87fa202.zip gdb-7ca69e9e10ef290eb3dd62a1e6bebbe4c87fa202.tar.gz gdb-7ca69e9e10ef290eb3dd62a1e6bebbe4c87fa202.tar.bz2 |
Implement new command line option for new ABI: -p which prevents the ARM code
from exhibiting any knowledge of the length of the processor's pipeline.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/armelf.em | 64 | ||||
-rw-r--r-- | ld/emultempl/armelf_oabi.em | 2 |
2 files changed, 62 insertions, 4 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em index 03f7aca..6512ee3 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -63,6 +63,62 @@ static void gld${EMULATION_NAME}_place_section static void gld${EMULATION_NAME}_before_parse PARAMS ((void)); static void gld${EMULATION_NAME}_before_allocation PARAMS ((void)); static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile)); +static int gld${EMULATION_NAME}_parse_args PARAMS((int, char **)); +static void gld${EMULATION_NAME}_list_options PARAMS ((FILE *)); + + +static int no_pipeline_knowledge = 0; + +static struct option longopts[] = +{ + { "no-pipeline-knowledge", no_argument, NULL, 'p'}, + { NULL, no_argument, NULL, 0 } +}; + +static void +gld${EMULATION_NAME}_list_options (file) + FILE * file; +{ + fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n")); +} + +static int +gld${EMULATION_NAME}_parse_args (argc, argv) + int argc; + char ** argv; +{ + int longind; + int optc; + int prevoptind = optind; + int prevopterr = opterr; + int wanterror; + static int lastoptind = -1; + + if (lastoptind != optind) + opterr = 0; + + wanterror = opterr; + lastoptind = optind; + + optc = getopt_long_only (argc, argv, "-p", longopts, & longind); + opterr = prevopterr; + + switch (optc) + { + default: + if (wanterror) + xexit (1); + optind = prevoptind; + return 0; + + case 'p': + no_pipeline_knowledge = 1; + break; + } + + return 1; +} + static void gld${EMULATION_NAME}_before_parse () @@ -1061,7 +1117,8 @@ gld${EMULATION_NAME}_before_allocation () { LANG_FOR_EACH_INPUT_STATEMENT (is) { - if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info)) + if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info, + no_pipeline_knowledge)) { /* xgettext:c-format */ einfo (_("Errors encountered processing file %s"), is->filename); @@ -1146,8 +1203,9 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = gld${EMULATION_NAME}_open_dynamic_archive, gld${EMULATION_NAME}_place_orphan, NULL, /* set_symbols */ - NULL, + gld${EMULATION_NAME}_parse_args, NULL, /* unrecognised file */ - NULL + gld${EMULATION_NAME}_list_options, + NULL /* recognized file */ }; EOF diff --git a/ld/emultempl/armelf_oabi.em b/ld/emultempl/armelf_oabi.em index c0526e5..20a50df 100644 --- a/ld/emultempl/armelf_oabi.em +++ b/ld/emultempl/armelf_oabi.em @@ -71,7 +71,7 @@ gld${EMULATION_NAME}_before_allocation () { LANG_FOR_EACH_INPUT_STATEMENT (is) { - if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info)) + if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, &link_info, 0)) { /* xgettext:c-format */ einfo (_("Errors encountered processing file %s"), is->filename); |