[PATCH] D36615: [XRay][CodeGen] Imbue attributes to the labels for XRay instrumentation

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 07:34:19 PDT 2017

dberris created this revision.

This change adds the following ELF attributes to the synthetic reference
used by XRay to keep around sections to define a strongly connected
component between the instrumented function and entries in the different
side sections:

- STV_HIDDEN (.hidden <label>) so that the relocations don't show up (or can be elided while linking) in the final binary when doing position-independent builds or otherwise.
- STB_LOCAL (.local <label>) so that the symbol is treated as a locally bound symbol, not needing resolution across object files at link-time.
- STT_NOTYPE (.type <label>, STT_NOTYPE) so that we explicitly not provide type information for data described by the label.

This should prevent us from emitting dynamically resolved symbols that
are unnecessary for the synthetic reference, which show up in the .text
section of a program.

We also apply the same for the labels for the instrumentation sleds that
are emitted also in the .text section, as well as the labels for the
instrumentation map entries referenced by the function index.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36615.110722.patch
Type: text/x-patch
Size: 6639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170811/c24b4ccd/attachment.bin>

More information about the llvm-commits mailing list