summaryrefslogtreecommitdiff
path: root/ld/ldemul.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-02-28 01:32:31 +0000
committerAlan Modra <amodra@bigpond.net.au>2003-02-28 01:32:31 +0000
commitf96097236641b56599d4f99f89c7367a72c8fee2 (patch)
treed0532f4174e1ad3bc121b0980e62d6d160122ec4 /ld/ldemul.h
parent0c902c9e7f2dfe7151f8b6444e877b58f14dbd0e (diff)
downloadbinutils-redhat-f96097236641b56599d4f99f89c7367a72c8fee2.tar.gz
* ldemul.c (ldemul_add_options, ldemul_handle_option): New functions.
(ldemul_parse_args): Return bfd_boolean. Formatting. * ldemul.h (ldemul_add_options, ldemul_handle_option): Declare. (ldemul_parse_args): Adjust. (struct ld_emulation_xfer_struct): Add add_options and handle_option. Return bfd_boolean from parse_args. * lexsup.c (parse_args): Malloc shortopts, longopts and really_longopts. Call ldemul_add_options and ldemul_handle_option. * emultempl/aix.em (gld${EMULATION_NAME}_add_options): Split out from gld${EMULATION_NAME}_parse_args. (gld${EMULATION_NAME}_handle_option): Likewise. (ld_${EMULATION_NAME}_emulation): Adjust initializer. * emultempl/armcoff.em: As for aix.em, but remove parse_args. * emultempl/beos.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/elf32.em: Likewise. Don't duplicate long options either. (gld${EMULATION_NAME}_add_sysroot): Prototype. * emultempl/armelf.em (PARSE_AND_LIST_LONGOPTS): Don't duplicate options. * emultempl/hppaelf.em (PARSE_AND_LIST_LONGOPTS): Likewise. * emultempl/ppc32elf.em (PARSE_AND_LIST_LONGOPTS): Likewise. * emultempl/ppc64elf.em (PARSE_AND_LIST_LONGOPTS): Likewise. * emultempl/armelf_oabi.em (ld_${EMULATION_NAME}_emulation): Adjust initializer. * emultempl/generic.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/gld960c.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/mipsecoff.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/netbsd.em (gldnetbsd_before_parse): Prototype.
Diffstat (limited to 'ld/ldemul.h')
-rw-r--r--ld/ldemul.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/ld/ldemul.h b/ld/ldemul.h
index a048b72ddc..548a7047ef 100644
--- a/ld/ldemul.h
+++ b/ld/ldemul.h
@@ -51,8 +51,12 @@ extern void ldemul_create_output_section_statements
PARAMS ((void));
extern bfd_boolean ldemul_place_orphan
PARAMS ((struct lang_input_statement_struct *, asection *));
-extern int ldemul_parse_args
+extern bfd_boolean ldemul_parse_args
PARAMS ((int, char **));
+extern void ldemul_add_options
+ PARAMS ((int, char **, int, struct option **, int, struct option **));
+extern bfd_boolean ldemul_handle_option
+ PARAMS ((int));
extern bfd_boolean ldemul_unrecognized_file
PARAMS ((struct lang_input_statement_struct *));
extern bfd_boolean ldemul_recognized_file
@@ -142,9 +146,18 @@ typedef struct ld_emulation_xfer_struct {
reading the script. Used to initialize symbols used in the script. */
void (*set_symbols) PARAMS ((void));
- /* Run to parse args which the base linker doesn't
- understand. Return non zero on sucess. */
- int (*parse_args) PARAMS ((int, char **));
+ /* Parse args which the base linker doesn't understand.
+ Return TRUE on success. */
+ bfd_boolean (*parse_args) PARAMS ((int, char **));
+
+ /* Hook to add options to parameters passed by the base linker to
+ getopt_long and getopt_long_only calls. */
+ void (*add_options)
+ PARAMS ((int, char **, int, struct option **, int, struct option **));
+
+ /* Companion to the above to handle an option. Returns TRUE if it is
+ one of our options. */
+ bfd_boolean (*handle_option) PARAMS ((int));
/* Run to handle files which are not recognized as object files or
archives. Return TRUE if the file was handled. */