xref: /openbsd-src/gnu/llvm/compiler-rt/lib/crt/crtend.c (revision 3cab2bb3f667058bece8e38b12449a63a9d73c4b)
1*3cab2bb3Spatrick //===-- crtend.c - End of constructors and destructors --------------------===//
2*3cab2bb3Spatrick //
3*3cab2bb3Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*3cab2bb3Spatrick // See https://llvm.org/LICENSE.txt for license information.
5*3cab2bb3Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*3cab2bb3Spatrick //
7*3cab2bb3Spatrick //===----------------------------------------------------------------------===//
8*3cab2bb3Spatrick 
9*3cab2bb3Spatrick #include <stdint.h>
10*3cab2bb3Spatrick 
11*3cab2bb3Spatrick // Put 4-byte zero which is the length field in FDE at the end as a terminator.
12*3cab2bb3Spatrick const int32_t __EH_FRAME_LIST_END__[]
13*3cab2bb3Spatrick     __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)),
14*3cab2bb3Spatrick                    visibility("hidden"), used)) = {0};
15*3cab2bb3Spatrick 
16*3cab2bb3Spatrick #ifndef CRT_HAS_INITFINI_ARRAY
17*3cab2bb3Spatrick typedef void (*fp)(void);
18*3cab2bb3Spatrick fp __CTOR_LIST_END__[]
19*3cab2bb3Spatrick     __attribute__((section(".ctors"), visibility("hidden"), used)) = {0};
20*3cab2bb3Spatrick fp __DTOR_LIST_END__[]
21*3cab2bb3Spatrick     __attribute__((section(".dtors"), visibility("hidden"), used)) = {0};
22*3cab2bb3Spatrick #endif
23