authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-25 03:50:18+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-25 18:50:59+02:00
log65af60edd004d656beff8f79e4dc19915cfcc6d5
tree1cfa34f555bd782297e59bd1f2423af23c4c9645
parentf96321be90394c47225c41c8b760fb403be09e88
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

ubsan-rt: export symbols with hidden visibility

see 092352ec63d3a4e9ff59a5d8ad8f119bf0eda468

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

lib/ubsan_rt.zig+3-3
...@@ -627,7 +627,7 @@ fn exportHandler(...@@ -627,7 +627,7 @@ fn exportHandler(
627 // Work around x86_64 backend limitation.627 // Work around x86_64 backend limitation.
628 const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;628 const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
629 const N = "__ubsan_handle_" ++ sym_name;629 const N = "__ubsan_handle_" ++ sym_name;
630 @export(handler, .{ .name = N, .linkage = linkage });630 @export(handler, .{ .name = N, .linkage = linkage, .visibility = if (linkage == .internal) .default else .hidden });
631}631}
632632
633fn exportHandlerWithAbort(633fn exportHandlerWithAbort(
...@@ -639,11 +639,11 @@ fn exportHandlerWithAbort(...@@ -639,11 +639,11 @@ fn exportHandlerWithAbort(
639 const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;639 const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
640 {640 {
641 const N = "__ubsan_handle_" ++ sym_name;641 const N = "__ubsan_handle_" ++ sym_name;
642 @export(handler, .{ .name = N, .linkage = linkage });642 @export(handler, .{ .name = N, .linkage = linkage, .visibility = if (linkage == .internal) .default else .hidden });
643 }643 }
644 {644 {
645 const N = "__ubsan_handle_" ++ sym_name ++ "_abort";645 const N = "__ubsan_handle_" ++ sym_name ++ "_abort";
646 @export(abort_handler, .{ .name = N, .linkage = linkage });646 @export(abort_handler, .{ .name = N, .linkage = linkage, .visibility = if (linkage == .internal) .default else .hidden });
647 }647 }
648}648}
649649