diff options
author | Nick Clifton <nickc@redhat.com> | 2019-05-22 15:58:57 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-05-22 15:58:57 +0100 |
commit | 6ec6968b1b259948ba42f0a47a3da048377058bc (patch) | |
tree | 030c549bdbd29b7aab0732641cf196d040524676 /ld/ldmain.c | |
parent | 8fca4da0759df376bcb646bc4b79a92ba27e2362 (diff) | |
download | gdb-6ec6968b1b259948ba42f0a47a3da048377058bc.zip gdb-6ec6968b1b259948ba42f0a47a3da048377058bc.tar.gz gdb-6ec6968b1b259948ba42f0a47a3da048377058bc.tar.bz2 |
Have the linker report an error if the same script is used twice.
PR 24576
* ld/ldfile.c: (ldfile_open_command_file_1): Add new parameter -
is_script. If true check that the file has not already been
parsed as a linker script.
(ldfile_open_script_file): New function.
(ldfile_try_open_bfd): Use the new function in place of
ldfile_open_command_line.
* ldmain.c (main): Likewise.
* lexsup.c (parse_args): Use the new function for opening linker
scripts with the -T option.
* ldfile.h (ldfile_open_script_file): Add prototype.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index da1c6a7..a7ca4f4 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -329,7 +329,7 @@ main (int argc, char **argv) if (saved_script_handle == NULL && command_line.default_script != NULL) { - ldfile_open_command_file (command_line.default_script); + ldfile_open_script_file (command_line.default_script); parser_input = input_script; yyparse (); } |