diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 13 | ||||
-rw-r--r-- | ld/emultempl/armelf.em | 64 | ||||
-rw-r--r-- | ld/emultempl/armelf_oabi.em | 2 |
3 files changed, 75 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 1a4373a..546d82f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +1999-05-29 Nick Clifton <nickc@cygnus.com> + + * emultempl/armelf.em (..._parse_args): New function: Parse + command line option. Accept arm-elf specific command line option + '-p' or '--no-pipeline-knowledge'. + (..._list_options): New function: Describe the new command line + option. + (..._before_allocation): Pass the value of the new variable + no_pipeline_knowledge to bfd_elf32_arm_process_before_allocation. + + * emultemp/armelf_oabi.em (..._before_allocation): Pass zero as + the third parameter to bfd_elf32_arm_process_before_allocation. + 1999-05-28 Nick Clifton <nickc@cygnus.com> * lexsup.c (help): Minor formatting changes. 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); |