Re: Have the linker report an error if the same script is used twice
git commit
6ec6968b1b2 results in
... error: linker script file '/usr/local/lib64/libgcc_s.so' appears multiple times
collect2: error: ld returned 1 exit status
FAIL: bootstrap
This patch changes things so that an error is given only when a -T
script or the default script is invoked more than once. I'm still a
little nervous that we match script file names, not the entire path.
PR 24576
* ldfile.c (enum script_open_style): New.
(struct script_name_list): New.
(ldfile_open_command_file_1): Take a script_open_style param
rather than booleans. Adjust callers. Only fail when -T or
default -T script is invoked twice.
(ldfile_try_open_bfd): Revert last change.