diff options
author | Nick Clifton <nickc@redhat.com> | 1999-08-23 09:07:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-08-23 09:07:45 +0000 |
commit | 3b108066c923292f1cb23589a897f663dd48884e (patch) | |
tree | 865855f39c32fd6634fb65c5d41a45735d44de28 /ld/emultempl | |
parent | 9e525108fef105148a4e6a8ed320f285c3b640e9 (diff) | |
download | gdb-3b108066c923292f1cb23589a897f663dd48884e.zip gdb-3b108066c923292f1cb23589a897f663dd48884e.tar.gz gdb-3b108066c923292f1cb23589a897f663dd48884e.tar.bz2 |
Add ability for individual targets to have their own command line switches by
defining PARSE_AND_LIST_ARGS.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/elf32.em | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 163e4c9..0c0ebb7 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1119,6 +1119,22 @@ EOF fi +if test -n "$PARSE_AND_LIST_ARGS" ; then +cat >>e${EMULATION_NAME}.c <<EOF +static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **)); +static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE * file)); + + $PARSE_AND_LIST_ARGS +EOF +else + +cat >>e${EMULATION_NAME}.c <<EOF +#define gld_${EMULATION_NAME}_parse_args NULL +#define gld_${EMULATION_NAME}_list_options NULL +EOF + +fi + cat >>e${EMULATION_NAME}.c <<EOF struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = @@ -1135,14 +1151,14 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - NULL, - NULL, + NULL, /* finish */ + NULL, /* create output section statements */ gld${EMULATION_NAME}_open_dynamic_archive, gld${EMULATION_NAME}_place_orphan, NULL, /* set_symbols */ - NULL, /* parse_args */ + gld_${EMULATION_NAME}_parse_args, NULL, /* unrecognized_file */ - NULL, /* list_options */ + gld_${EMULATION_NAME}_list_options, NULL /* recognized_file */ }; EOF |