blob: 14a1f80b414bfc62ddde104f42f12728f2674367 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Note [Subsections Via Symbols]
If we are using the .subsections_via_symbols directive
(available on recent versions of Darwin),
we have to make sure that there is some kind of reference
from the entry code to a label on the _top_ of of the info table,
so that the linker will not think it is unreferenced and dead-strip
it. That's why the label is called a DeadStripPreventer (_dsp).
The LLVM code gen already creates `iTableSuf` symbols, where
the X86 would generate the DeadStripPreventer (_dsp) symbol.
Therefore all that is left for llvm code gen, is to ensure
that all the `iTableSuf` symbols are marked as used.
As of this writing the documentation regarding the
.subsections_via_symbols and -dead_stip can be found at
<https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html#//apple_ref/doc/uid/TP30000823-TPXREF101>
|