diff --git a/libc/startup/baremetal/fini.h b/libc/startup/baremetal/fini.h index 74e9601983a33..605d4920f9704 100644 --- a/libc/startup/baremetal/fini.h +++ b/libc/startup/baremetal/fini.h @@ -7,6 +7,10 @@ //===----------------------------------------------------------------------===// #include "hdr/stdint_proxy.h" +#include "src/__support/macros/config.h" + +// NOTE: The namespace is necessary here to set the correct symbol visibility. +namespace LIBC_NAMESPACE_DECL { extern "C" { extern uintptr_t __fini_array_start[]; @@ -14,3 +18,5 @@ extern uintptr_t __fini_array_end[]; void __libc_fini_array(void); } // extern "C" + +} // namespace LIBC_NAMESPACE_DECL diff --git a/libc/startup/baremetal/init.h b/libc/startup/baremetal/init.h index 6b545db3976da..31497aefa170a 100644 --- a/libc/startup/baremetal/init.h +++ b/libc/startup/baremetal/init.h @@ -7,6 +7,10 @@ //===----------------------------------------------------------------------===// #include "hdr/stdint_proxy.h" +#include "src/__support/macros/config.h" + +// NOTE: The namespace is necessary here to set the correct symbol visibility. +namespace LIBC_NAMESPACE_DECL { extern "C" { extern uintptr_t __preinit_array_start[]; @@ -16,3 +20,5 @@ extern uintptr_t __init_array_end[]; void __libc_init_array(void); } // extern "C" + +} // namespace LIBC_NAMESPACE_DECL