aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-06-15 20:46:43 +0000
committerIan Lance Taylor <ian@airs.com>1994-06-15 20:46:43 +0000
commit7fb9ca5fc27e521d28d5ef74bfd73b0b8bab8da6 (patch)
tree7ba9f19d65ccbfa55579fd36b4c05e827c77aa1d /ld/lexsup.c
parent57569ce8d17b939e41d9af72237207fe3e3ede89 (diff)
downloadfsf-binutils-gdb-7fb9ca5fc27e521d28d5ef74bfd73b0b8bab8da6.zip
fsf-binutils-gdb-7fb9ca5fc27e521d28d5ef74bfd73b0b8bab8da6.tar.gz
fsf-binutils-gdb-7fb9ca5fc27e521d28d5ef74bfd73b0b8bab8da6.tar.bz2
Let the user change the dynamic linker used by ELF code.
* ld.h (args_type): Add new field interpreter. * lexsup.c (parse_args): Add dynamic-linker to longopts, and handle it. * ldmain.c (main): Initialize command_line.interpreter to NULL. * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Get the ELF backend to return the .interp section. If command_line.interpreter is not NULL, set the contents of .interp to it. * ld.texinfo: Mention -dynamic-linker.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 668ec25..0b52a11 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -57,7 +57,8 @@ parse_args (argc, argv)
#define OPTION_CALL_SHARED 150
#define OPTION_DEFSYM (OPTION_CALL_SHARED + 1)
-#define OPTION_EB (OPTION_DEFSYM + 1)
+#define OPTION_DYNAMIC_LINKER (OPTION_DEFSYM + 1)
+#define OPTION_EB (OPTION_DYNAMIC_LINKER + 1)
#define OPTION_EL (OPTION_EB + 1)
#define OPTION_HELP (OPTION_EL + 1)
#define OPTION_IGNORE (OPTION_HELP + 1)
@@ -85,6 +86,7 @@ parse_args (argc, argv)
{"dn", no_argument, NULL, OPTION_NON_SHARED},
{"dp", no_argument, NULL, 'd'},
{"dy", no_argument, NULL, OPTION_CALL_SHARED},
+ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
{"EB", no_argument, NULL, OPTION_EB},
{"EL", no_argument, NULL, OPTION_EL},
{"format", required_argument, NULL, 'b'},
@@ -160,6 +162,9 @@ parse_args (argc, argv)
parser_input = input_defsym;
yyparse ();
break;
+ case OPTION_DYNAMIC_LINKER:
+ command_line.interpreter = optarg;
+ break;
case OPTION_EB:
/* FIXME: This is currently ignored. It means
``produce a big-endian object file''. It could