| ... | @@ -1441,8 +1441,14 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void { | ... | @@ -1441,8 +1441,14 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void { |
| 1441 | | 1441 | |
| 1442 | if (link_in_crt) { | 1442 | if (link_in_crt) { |
| 1443 | const crt1o: []const u8 = o: { | 1443 | const crt1o: []const u8 = o: { |
| 1444 | if (target.os.tag == .netbsd or target.os.tag == .openbsd) { | 1444 | if (target.os.tag == .netbsd) { |
| 1445 | break :o "crt0.o"; | 1445 | break :o "crt0.o"; |
| | 1446 | } else if (target.os.tag == .openbsd) { |
| | 1447 | if (self.base.options.link_mode == .Static) { |
| | 1448 | break :o "rcrt0.o"; |
| | 1449 | } else { |
| | 1450 | break :o "crt0.o"; |
| | 1451 | } |
| 1446 | } else if (target.isAndroid()) { | 1452 | } else if (target.isAndroid()) { |
| 1447 | if (self.base.options.link_mode == .Dynamic) { | 1453 | if (self.base.options.link_mode == .Dynamic) { |
| 1448 | break :o "crtbegin_dynamic.o"; | 1454 | break :o "crtbegin_dynamic.o"; |