1// Copyright 2017 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include <asm.h>
6
7// See the end of dynlink.c for what this is about.
8
9.section .text._dynlink_sancov_trace_pc_guard,"ax",%progbits
10
11.weak __sanitizer_cov_trace_pc_guard
12
13ENTRY(_dynlink_sancov_trace_pc_guard)
14#ifdef __x86_64__
15    jmp *__sanitizer_cov_trace_pc_guard@GOTPCREL(%rip)
16#elif defined(__aarch64__)
17    adrp x16, :got:__sanitizer_cov_trace_pc_guard
18    ldr x16, [x16, #:got_lo12:__sanitizer_cov_trace_pc_guard]
19    br x16
20#else
21# error unsupported architecture
22#endif
23END(_dynlink_sancov_trace_pc_guard)
24.hidden _dynlink_sancov_trace_pc_guard
25