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 05:10:12+02:00
logbed8171d4e41a2bb6759c96076f957920e039bfd
treeba5a33db9ffba7f5a1bab80b56f0d01a9c01f956
parentc327444f5cb2e825a5a6c9e3fc931bd1f5dd0e17
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