Skip to content

Commit f72cf06

Browse files
Match behavior of Apple's ld by resolving symlinks in OSO paths
1 parent 54be9f7 commit f72cf06

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lld/MachO/SyntheticSections.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,10 @@ void SymtabSection::emitObjectFileStab(ObjFile *file) {
11861186
if (ec)
11871187
fatal("failed to get absolute path for " + path);
11881188

1189+
SmallString<261> resolvedPath;
1190+
if (!sys::fs::real_path(path, resolvedPath))
1191+
path = resolvedPath;
1192+
11891193
if (!file->archiveName.empty())
11901194
path.append({"(", file->getName(), ")"});
11911195

0 commit comments

Comments
 (0)