diff --git a/src/link.cpp b/src/link.cpp index 44b3abaa90bc051b90f81fd1087cd26487c1d39d..8a1f889234d8d866165a81bdb2433cac4fefa457 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -1753,7 +1753,7 @@ static void construct_linker_job_elf(LinkJob *lj) { // libc dep - if (g->libc_link_lib != nullptr) { + if (g->libc_link_lib != nullptr && g->out_type != OutTypeObj) { if (g->libc != nullptr) { if (!g->have_dynamic_link) { lj->args.append("--start-group");