Skip to content

Commit

Permalink
[LLD] [ELF] Fix up a comment regarding the --wrap option. NFC.
Browse files Browse the repository at this point in the history
Add missing leading underscores to the __wrap_<symbol> and
__real_<symbol> names.

Differential Revision: https://reviews.llvm.org/D89008
  • Loading branch information
mstorsjo committed Oct 8, 2020
1 parent b4ffc40 commit 9b2b327
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lld/ELF/Driver.cpp
Expand Up @@ -1837,9 +1837,9 @@ template <class ELFT> void LinkerDriver::compileBitcodeFiles() {

// The --wrap option is a feature to rename symbols so that you can write
// wrappers for existing functions. If you pass `-wrap=foo`, all
// occurrences of symbol `foo` are resolved to `wrap_foo` (so, you are
// expected to write `wrap_foo` function as a wrapper). The original
// symbol becomes accessible as `real_foo`, so you can call that from your
// occurrences of symbol `foo` are resolved to `__wrap_foo` (so, you are
// expected to write `__wrap_foo` function as a wrapper). The original
// symbol becomes accessible as `__real_foo`, so you can call that from your
// wrapper.
//
// This data structure is instantiated for each -wrap option.
Expand Down

0 comments on commit 9b2b327

Please sign in to comment.