authorgravatar for semarie@online.frSébastien Marie <semarie@online.fr> 2020-10-11 10:12:40+00:00
committergravatar for semarie@online.frSébastien Marie <semarie@online.fr> 2020-10-11 10:12:40+00:00
log9ff51f22b46d083dbd80e427a00a7f392c467f83
treeed952a7f26b5d3e606ff4c9730a933aa2b4ce4cd
parent97ec9fdd7929880699179f5024b8bb93ac424ee2

openbsd: address link/Elf.zig comments

- restore correct behaviour on Android target for appending "crtend_android.o" - some nits

1 files changed, 5 insertions(+), 5 deletions(-)

src/link/Elf.zig+5-5
...@@ -1448,14 +1448,14 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {...@@ -1448,14 +1448,14 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
1448 };1448 };
1449 try argv.append(try comp.get_libc_crt_file(arena, crt1o));1449 try argv.append(try comp.get_libc_crt_file(arena, crt1o));
1450 if (target_util.libc_needs_crti_crtn(target)) {1450 if (target_util.libc_needs_crti_crtn(target)) {
1451 const crtio: []const u8 = o: {1451 const crti_o = o: {
1452 if (target.os.tag == .openbsd) {1452 if (target.os.tag == .openbsd) {
1453 break :o "crtbegin.o";1453 break :o "crtbegin.o";
1454 } else {1454 } else {
1455 break :o "crti.o";1455 break :o "crti.o";
1456 }1456 }
1457 };1457 };
1458 try argv.append(try comp.get_libc_crt_file(arena, crtio));1458 try argv.append(try comp.get_libc_crt_file(arena, crti_o));
1459 }1459 }
1460 }1460 }
14611461
...@@ -1599,8 +1599,8 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {...@@ -1599,8 +1599,8 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
15991599
1600 // crt end1600 // crt end
1601 if (link_in_crt) {1601 if (link_in_crt) {
1602 if (target_util.libc_needs_crti_crtn(target)) {1602 if (target.isAndroid() or target_util.libc_needs_crti_crtn(target)) {
1603 const crtno: []const u8 = o: {1603 const crtn_o = o: {
1604 if (target.os.tag == .openbsd) {1604 if (target.os.tag == .openbsd) {
1605 break :o "crtend.o";1605 break :o "crtend.o";
1606 } else if (target.isAndroid()) {1606 } else if (target.isAndroid()) {
...@@ -1609,7 +1609,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {...@@ -1609,7 +1609,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void {
1609 break :o "crtn.o";1609 break :o "crtn.o";
1610 }1610 }
1611 };1611 };
1612 try argv.append(try comp.get_libc_crt_file(arena, crtno));1612 try argv.append(try comp.get_libc_crt_file(arena, crtn_o));
1613 }1613 }
1614 }1614 }
16151615