[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/16895] building mariadb-5.5.37 with gold - .../libmysql_versio

From: ccoutant at google dot com
Subject: [Bug gold/16895] building mariadb-5.5.37 with gold - .../libmysql_versions.ld:155:9: invalid use of VERSION in input file
Date: Fri, 02 May 2014 19:06:41 +0000


--- 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
>   `--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.


You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]