mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
ubsan-rt: export symbols with hidden visibility
see 092352ec63d3a4e9ff59a5d8ad8f119bf0eda468
This commit is contained in:
parent
c327444f5c
commit
bed8171d4e
@ -627,7 +627,7 @@ fn exportHandler(
|
||||
// Work around x86_64 backend limitation.
|
||||
const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
|
||||
const N = "__ubsan_handle_" ++ sym_name;
|
||||
@export(handler, .{ .name = N, .linkage = linkage });
|
||||
@export(handler, .{ .name = N, .linkage = linkage, .visibility = if (linkage == .internal) .default else .hidden });
|
||||
}
|
||||
|
||||
fn exportHandlerWithAbort(
|
||||
@ -639,11 +639,11 @@ fn exportHandlerWithAbort(
|
||||
const linkage = if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .windows) .internal else .weak;
|
||||
{
|
||||
const N = "__ubsan_handle_" ++ sym_name;
|
||||
@export(handler, .{ .name = N, .linkage = linkage });
|
||||
@export(handler, .{ .name = N, .linkage = linkage, .visibility = if (linkage == .internal) .default else .hidden });
|
||||
}
|
||||
{
|
||||
const N = "__ubsan_handle_" ++ sym_name ++ "_abort";
|
||||
@export(abort_handler, .{ .name = N, .linkage = linkage });
|
||||
@export(abort_handler, .{ .name = N, .linkage = linkage, .visibility = if (linkage == .internal) .default else .hidden });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user