[llvm] r323783 - CodeGen: support an extension to pass linker options on ELF

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 12:48:55 PST 2018


Saleem Abdulrasool via llvm-commits <llvm-commits at lists.llvm.org>
writes:

> +``.linker-options`` Section (linker options)
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +In order to support passing linker options from the frontend to the linker, a
> +special section of type ``SHT_LLVM_LINKER_OPTIONS`` (usually named
> +``.linker-options`` though the name is not significant as it is identified by
> +the type).  The contents of this section is a simple pair-wise encoding of
> +options for consideration by the linker.

s/options/directives/ just to make it clear that they are *not* command
line options.


>  The strings are encoded as standard
> +null-terminated UTF-8 strings.  They are emitted inline to avoid having the
> +linker to traverse the object file for retrieving the value.

s/to traverse/traverse/

> The linker is
> +permitted to not honour the option and instead provide a warning/error to the
> +user that the requested option was not honoured.
> +
> +The section is marked as ``SHT_LLVM_LINKER_OPTIONS``

s/is marked as/has type/

> +LLVM emits the following options:
> +  - lib
> +
> +    The parameter identifies a library to be linked against.  The library will
> +    be looked up in the default and any specified library search paths
> +    (specified to this point).
> +
> +  - path
> +
> +    The paramter identifies an additional library search path to be considered
> +    when looking up libraries after the inclusion of this option.

What is meant my "LLVM emits"? LLVM itself prints any options it sees in
the metadata.

Maybe just say "The following options are specified:"?

Thanks,
Rafael


More information about the llvm-commits mailing list