[PATCH] D86909: [lld-macho] Initial support for common symbols

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 15:04:42 PDT 2020


int3 added inline comments.


================
Comment at: lld/MachO/SymbolTable.cpp:85
+    if (auto *common = dyn_cast<CommonSymbol>(s)) {
+      if (size >= common->size) {
+        common->file = file;
----------------
int3 wrote:
> int3 wrote:
> > MaskRay wrote:
> > > This is strange. Is it `>`?
> > This is intentional. The `same-size.s` test verifies this behavior, and can be used to check that ld64 does the same thing.
> actually, I may have messed up the test...
okay fixed. ld64 actually takes the smaller alignment if the sizes are equal. still different from lld-ELF's behavior though...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86909/new/

https://reviews.llvm.org/D86909



More information about the llvm-commits mailing list