[PATCH] D40849: CodeGen: support an extension to pass linker options on ELF

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 15:01:11 PST 2018


ruiu added inline comments.


================
Comment at: docs/Extensions.rst:228
+special section ``.linker-options`` is emitted when necessary.  The contents of
+this section is a simple pair-wise encoding of options for consideration by the
+linker.  The strings are encoded as standard null-terminated C-strings.  They
----------------
The section name is not significant -- you should say a section with SHT_LLVM_LINKER_OPTIONS type (which is usually named .linker-options though name is not significant.)


================
Comment at: docs/Extensions.rst:230
+linker.  The strings are encoded as standard null-terminated C-strings.  They
+are emitted inline to avoid having the linker to traverse the object file for
+retrieving the value.  The linker is permitted to not honour the option and
----------------
Specifying the encoding is important if a path contains non-ASCII characters. "null-terminated C-strings" are a bit redundant because it means C-strings or null-terminated strings. So I'd update

   The strings are encoded as null-terminated UTF-8 strings.



================
Comment at: docs/Extensions.rst:241
+
+.. code-block:: gas
+
----------------
This document should also cover the options that we want to use at the moment, e.g. "lib" and "path", and let people who want to add a new option to update this document, so that this document becomes a virtual standard doc for this feature. Otherwise, there's a risk that people start to add arbitrary options and this feature gets out of control.


Repository:
  rL LLVM

https://reviews.llvm.org/D40849





More information about the llvm-commits mailing list