CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
41 lines
1.8 KiB
C++
41 lines
1.8 KiB
C++
// -*- C++ -*-
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Utilities for locating the address range of a function.
|
|
//
|
|
// On MachO targets the linker synthesises section$start$SEG$sect /
|
|
// section$end$SEG$sect symbols; __asm() is used to bind them to valid C
|
|
// identifiers without the leading '_' implied by the Darwin User Label Prefix.
|
|
//
|
|
// On ELF targets the linker synthesises __start_<section> / __stop_<section>
|
|
// symbols for any section whose name is a valid C identifier.
|
|
// We don't use dladdr() because on musl it's a no-op when statically linked.
|
|
|
|
#ifndef LIBUNWIND_TEST_SUPPORT_FUNC_BOUNDS_H
|
|
#define LIBUNWIND_TEST_SUPPORT_FUNC_BOUNDS_H
|
|
|
|
#ifdef __APPLE__
|
|
#define FUNC_BOUNDS_DECL(name) \
|
|
extern char name##_start __asm("section$start$__TEXT$__" #name); \
|
|
extern char name##_end __asm("section$end$__TEXT$__" #name)
|
|
#define FUNC_ATTR(name) \
|
|
__attribute__((section("__TEXT,__" #name ",regular,pure_instructions")))
|
|
#define FUNC_START(name) (&name##_start)
|
|
#define FUNC_END(name) (&name##_end)
|
|
#else
|
|
#define FUNC_BOUNDS_DECL(name) \
|
|
extern char __start_##name; \
|
|
extern char __stop_##name
|
|
#define FUNC_ATTR(name) __attribute__((section(#name)))
|
|
#define FUNC_START(name) (&__start_##name)
|
|
#define FUNC_END(name) (&__stop_##name)
|
|
#endif
|
|
|
|
#endif // LIBUNWIND_TEST_SUPPORT_FUNC_BOUNDS_H
|