[all-commits] [llvm/llvm-project] e12a02: [llvm-jitlink] Support promotion of ODR weak symbo...

lhames via All-commits all-commits at lists.llvm.org
Sat Aug 1 18:34:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e12a028ed3ed79fba1e1aa5212c7e22d83949192
      https://github.com/llvm/llvm-project/commit/e12a028ed3ed79fba1e1aa5212c7e22d83949192
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-08-01 (Sat, 01 Aug 2020)

  Changed paths:
    M llvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_test_harness_test.s
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.h

  Log Message:
  -----------
  [llvm-jitlink] Support promotion of ODR weak symbols in -harness mode.

This prevents weak symbols from being immediately dead-stripped when not
directly referenced from the test harneess, enabling use of weak symbols
from the code under test.


  Commit: 0f5b70769d15d8cc728dcba353a33fb459450381
      https://github.com/llvm/llvm-project/commit/0f5b70769d15d8cc728dcba353a33fb459450381
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-08-01 (Sat, 01 Aug 2020)

  Changed paths:
    M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
    M llvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_test_harness_test.s
    M llvm/test/ExecutionEngine/JITLink/X86/MachO_test_harness_harness.s
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp

  Log Message:
  -----------
  [llvm-jitlink] Add -phony-externals option to suppress unresolved externals.

The -phony-externals option adds a generator which explicitly defines any
otherwise unresolved externals as null. This transforms link-time
unresolved-symbol errors into potential runtime null pointer accesses
(if an unresolved external is actually accessed during execution).

This option can be useful in -harness mode to avoid having to mock a
large number of symbols that are not reachable at runtime (e.g. unused
methods referenced by a class vtable).


Compare: https://github.com/llvm/llvm-project/compare/e281376e996e...0f5b70769d15


More information about the All-commits mailing list