[PATCH] D45375: [ELF] - Introduce synthetic file for linker script symbols.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 08:43:32 PDT 2018


grimar created this revision.
grimar added reviewers: ruiu, espindola.
Herald added subscribers: arichardson, emaste.

I suggest assigning a synthetic file for linker script and --defsym symbols, that would allow enabling
our `toString` logic to work with them properly.

That is useful for the following things:

1. We can print --defsym and linker script files in -cref. (LLD currently prints `<internal>` instead of a valid location)
2. Useful for error reporting.
3. Useful for debugging. (Not so important, but nice to have for free).

The result of such change is shown in the test cases.


https://reviews.llvm.org/D45375

Files:
  ELF/InputFiles.h
  ELF/LTO.cpp
  ELF/LinkerScript.cpp
  ELF/MapFile.cpp
  ELF/ScriptParser.cpp
  test/ELF/cref.s
  test/ELF/just-symbols-cref.s
  test/ELF/linkerscript/cref.s
  test/ELF/linkerscript/relocation-relative-absolute.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45375.141355.patch
Type: text/x-patch
Size: 5826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180406/81cd04e2/attachment.bin>


More information about the llvm-commits mailing list