Commit 2f5835f
committed
[ObjCopy][DX] Support for -dump-section flag
This adds support for the -dump-section=<section>=<file> flag for the
DXContainer file format. This flag dumps the contents of a named section
to the specified file.
This flag is particularly handy for ripping DXIL bitcode out of the
object files so that we can use LLVM tools to inspect and operate on
the bitcode. To facilitate that workflow this flag also strips the
program headers from parts containing DXIL so that the resulting file is
a valid bitcode file.
../llvm/lib/ObjCopy/DXContainer/DXContainerObjcopy.cpp
../llvm/test/tools/llvm-objcopy/DXContainer/dump-section.yaml1 parent e764e19 commit 2f5835f
File tree
3 files changed
+326
-8
lines changed- llvm
- lib/ObjCopy
- DXContainer
- test/tools/llvm-objcopy/DXContainer
3 files changed
+326
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
45 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
46 | 81 | | |
47 | 82 | | |
48 | 83 | | |
| |||
0 commit comments