Skip to content

Commit

Permalink
Match behavior of Apple's ld by resolving symlinks in OSO paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcclellan-figma committed Jul 30, 2024
1 parent 7d80ad6 commit bb36812
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lld/MachO/SyntheticSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,10 @@ void SymtabSection::emitObjectFileStab(ObjFile *file) {
if (ec)
fatal("failed to get absolute path for " + path);

SmallString<261> resolvedPath;
if (!sys::fs::real_path(path, resolvedPath))
path = resolvedPath;

if (!file->archiveName.empty())
path.append({"(", file->getName(), ")"});

Expand Down

0 comments on commit bb36812

Please sign in to comment.