https://sourceware.org/bugzilla/show_bug.cgi?id=16895
--- Comment #6 from Cary Coutant <ccoutant at google dot com> --- > There is no -T (--script), indeed. It is intentional. ld manual says > > 3.11 Implicit Linker Scripts > ============================ > If you specify a linker input file which the linker can not recognize as > an object file or an archive file, it will try to read the file as a > linker script. > > while -T and --script mean > > `-T SCRIPTFILE' > `--script=SCRIPTFILE' > Use SCRIPTFILE as the linker script. This script replaces `ld''s > default linker script (rather than adding to it), so COMMANDFILE > must specify everything necessary to describe the output file. > > My intention was, precisely, to *add* to the default linker script, so I could > not use -T (--script). > > See also the last comment in https://mariadb.atlassian.net/browse/MDEV-5982 OK, I see. For gold, using -T works because there is no default linker script to replace. But coming up with something that works with both linkers is clearly desirable. I think you could separate your script into all the stuff before "VERSION { ... }", and leave that in an implicit linker script, then put everything from the VERSION block into a separate file and add that with --version-script. I'll have to do some investigation to figure out how gnu ld handles this, but in gold, we need to have the version script parsed before we start processing input files. But we can't parse implicit version scripts first because we can't tell that they're scripts until we actually start reading the input files; adding another pass over all the files just to look for implicit scripts would be impractical. Besides, implicit scripts that contain INPUT commands need to be processed in order with all other input files. -cary -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils