[PATCH] D114841: [lld-macho] Fix duplicate symbols with relocatable objects

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 08:34:24 PST 2021


oontvoo requested changes to this revision.
oontvoo added inline comments.
This revision now requires changes to proceed.


================
Comment at: lld/MachO/Driver.cpp:322-324
   case file_magic::macho_object:
-    newFile = make<ObjFile>(mbref, getModTime(path), "");
+    newFile = loadedObjects[path] = make<ObjFile>(mbref, getModTime(path), "");
     break;
----------------
On a second thought, this is suspicious. Doesn't this mean `%lld foo.o foo.o ` wouldn't yield "duplicate symbols" error anymore?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114841



More information about the llvm-commits mailing list