[all-commits] [llvm/llvm-project] 9f1dcd: [JITLink] Allow JITLinkContext::notifyResolved to ...
lhames via All-commits
all-commits at lists.llvm.org
Thu Jul 30 15:26:42 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 9f1dcdca71c4109354ec916ad27c24caf269c705
https://github.com/llvm/llvm-project/commit/9f1dcdca71c4109354ec916ad27c24caf269c705
Author: Lang Hames <lhames at gmail.com>
Date: 2020-07-30 (Thu, 30 Jul 2020)
Changed paths:
M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
M llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
Log Message:
-----------
[JITLink] Allow JITLinkContext::notifyResolved to return an Error.
This allows clients to detect invalid transformations applied by JITLink passes
(e.g. inserting or removing symbols in unexpected ways) and terminate linking
with an error.
This change is used to simplify the error propagation logic in
ObjectLinkingLayer.
Commit: 8ce8cee1e1d44d480ea87f1ac47eddcf07c433d1
https://github.com/llvm/llvm-project/commit/8ce8cee1e1d44d480ea87f1ac47eddcf07c433d1
Author: Lang Hames <lhames at gmail.com>
Date: 2020-07-30 (Thu, 30 Jul 2020)
Changed paths:
M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
A llvm/test/ExecutionEngine/JITLink/X86/Inputs/MachO_test_harness_test.s
A llvm/test/ExecutionEngine/JITLink/X86/MachO_test_harness_harness.s
M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
M llvm/tools/llvm-jitlink/llvm-jitlink.h
Log Message:
-----------
[llvm-jitlink] Add -harness option to llvm-jitlink.
The -harness option enables new testing use-cases for llvm-jitlink. It takes a
list of objects to treat as a test harness for any regular objects passed to
llvm-jitlink.
If any files are passed using the -harness option then the following
transformations are applied to all other files:
(1) Symbols definitions that are referenced by the harness files are promoted
to default scope. (This enables access to statics from test harness).
(2) Symbols definitions that clash with definitions in the harness files are
deleted. (This enables interposition by test harness).
(3) All other definitions in regular files are demoted to local scope.
(This causes untested code to be dead stripped, reducing memory cost and
eliminating spurious unresolved symbol errors from untested code).
These transformations allow the harness files to reference and interpose
symbols in the regular object files, which can be used to support execution
tests (including fuzz tests) of functions in relocatable objects produced by a
build.
Compare: https://github.com/llvm/llvm-project/compare/763671f387fd...8ce8cee1e1d4
More information about the All-commits
mailing list