[PATCH] D76482: [lld][ELF] Provide optional hidden symbol for build ID

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 00:31:00 PDT 2020


phosek created this revision.
phosek added a reviewer: ruiu.
Herald added subscribers: llvm-commits, MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

This change introduces a new optional hidden symbol __build_id which
points at the the .note.gnu.build-id section (if enabled). This is
useful in instrumentation runtimes such as profile where we want to
merge profiles produced by the same module: build ID can be used to
uniquely identify modules but there's no easy way to access it at
runtime from the module itself. The __build_id symbol allows this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76482

Files:
  lld/ELF/Symbols.cpp
  lld/ELF/Symbols.h
  lld/ELF/Writer.cpp
  lld/test/ELF/build-id.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76482.251562.patch
Type: text/x-patch
Size: 3414 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200320/fe4760b1/attachment.bin>


More information about the llvm-commits mailing list