[PATCH] D133825: [lld-macho] Add support for N_INDR symbols

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 18:12:04 PDT 2022


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a reviewer: ributzka.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is similar to the `-alias` CLI option, but it gives finer-grained
control in that it allows the aliased symbols to be treated as private
externs.

While working on this, I realized that our `-alias` handling did not
cover the cases where the aliased symbol is a common or dylib symbol,
nor the case where we have an undefined that gets treated specially and
converted to a defined later on. My N_INDR handling neglects this too
for now; I've added checks and TODO messages for these.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133825

Files:
  lld/MachO/Driver.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputFiles.h
  lld/MachO/SymbolTable.cpp
  lld/MachO/SymbolTable.h
  lld/MachO/Symbols.h
  lld/test/MachO/aliases.s
  lld/test/MachO/cli-aliases.s
  lld/test/MachO/symbol-aliases.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133825.459945.patch
Type: text/x-patch
Size: 13189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220914/1d947dda/attachment.bin>


More information about the llvm-commits mailing list