| author | |
| committer | |
| log | 474e9082244b7d2e7e0d978b40b16bcbe21c5918 |
| tree | 81785f68b531bc3b110b379e5c1092d9ac3efe50 |
| parent | 1b7a78122ecf9d5f6d36b46c26bd5e3fb8211eea |
| signature | Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM |
3 files changed, 5 insertions(+), 21 deletions(-)
lib/compiler_rt/memcpy.zig+2-10| ... | @@ -1,20 +1,12 @@ | ... | @@ -1,20 +1,12 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const compiler_rt = @import("../compiler_rt.zig"); | 3 | const compiler_rt = @import("../compiler_rt.zig"); |
| 4 | const symbol = compiler_rt.symbol; | ||
| 4 | const builtin = @import("builtin"); | 5 | const builtin = @import("builtin"); |
| 5 | 6 | ||
| 6 | comptime { | 7 | comptime { |
| 7 | if (builtin.object_format != .c) { | 8 | if (builtin.object_format != .c) { |
| 8 | const export_options: std.builtin.ExportOptions = .{ | 9 | symbol(if (builtin.mode == .small or builtin.zig_backend == .stage2_aarch64) &memcpySmall else &memcpyFast, "memcpy"); |
| 9 | .name = "memcpy", | ||
| 10 | .linkage = compiler_rt.linkage, | ||
| 11 | .visibility = compiler_rt.visibility, | ||
| 12 | }; | ||
| 13 | |||
| 14 | if (builtin.mode == .small or builtin.zig_backend == .stage2_aarch64) | ||
| 15 | @export(&memcpySmall, export_options) | ||
| 16 | else | ||
| 17 | @export(&memcpyFast, export_options); | ||
| 18 | } | 10 | } |
| 19 | } | 11 | } |
| 20 | 12 |
lib/compiler_rt/memmove.zig+2-10| ... | @@ -1,5 +1,6 @@ | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const compiler_rt = @import("../compiler_rt.zig"); | 2 | const compiler_rt = @import("../compiler_rt.zig"); |
| 3 | const symbol = compiler_rt.symbol; | ||
| 3 | const builtin = @import("builtin"); | 4 | const builtin = @import("builtin"); |
| 4 | const assert = std.debug.assert; | 5 | const assert = std.debug.assert; |
| 5 | const memcpy = @import("memcpy.zig"); | 6 | const memcpy = @import("memcpy.zig"); |
| ... | @@ -8,16 +9,7 @@ const Element = compiler_rt.PreferredLoadStoreElement; | ... | @@ -8,16 +9,7 @@ const Element = compiler_rt.PreferredLoadStoreElement; |
| 8 | 9 | ||
| 9 | comptime { | 10 | comptime { |
| 10 | if (builtin.object_format != .c) { | 11 | if (builtin.object_format != .c) { |
| 11 | const export_options: std.builtin.ExportOptions = .{ | 12 | symbol(if (builtin.mode == .small or builtin.zig_backend == .stage2_aarch64) &memmoveSmall else &memmoveFast, "memmove"); |
| 12 | .name = "memmove", | ||
| 13 | .linkage = compiler_rt.linkage, | ||
| 14 | .visibility = compiler_rt.visibility, | ||
| 15 | }; | ||
| 16 | |||
| 17 | if (builtin.mode == .small or builtin.zig_backend == .stage2_aarch64) | ||
| 18 | @export(&memmoveSmall, export_options) | ||
| 19 | else | ||
| 20 | @export(&memmoveFast, export_options); | ||
| 21 | } | 13 | } |
| 22 | } | 14 | } |
| 23 | 15 |
lib/compiler_rt/ssp.zig+1-1| ... | @@ -22,7 +22,7 @@ extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) call | ... | @@ -22,7 +22,7 @@ extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) call |
| 22 | extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8; | 22 | extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8; |
| 23 | 23 | ||
| 24 | comptime { | 24 | comptime { |
| 25 | @export(&__stack_chk_fail, .{ .name = if (builtin.os.tag == .openbsd) "__stack_smash_handler" else "__stack_chk_fail", .linkage = compiler_rt.linkage, .visibility = compiler_rt.visibility }); | 25 | symbol(&__stack_chk_fail, if (builtin.os.tag == .openbsd) "__stack_smash_handler" else "__stack_chk_fail"); |
| 26 | symbol(&__chk_fail, "__chk_fail"); | 26 | symbol(&__chk_fail, "__chk_fail"); |
| 27 | symbol(&__stack_chk_guard, if (builtin.os.tag == .openbsd) "__guard_local" else "__stack_chk_guard"); | 27 | symbol(&__stack_chk_guard, if (builtin.os.tag == .openbsd) "__guard_local" else "__stack_chk_guard"); |
| 28 | symbol(&__strcpy_chk, "__strcpy_chk"); | 28 | symbol(&__strcpy_chk, "__strcpy_chk"); |