#ifndef LLVM_LIBC_STARTUP_LINUX_GNU_PROPERTY_SECTION_H
#define LLVM_LIBC_STARTUP_LINUX_GNU_PROPERTY_SECTION_H
#include "hdr/elf_proxy.h"
#include "hdr/link_macros.h"
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
struct GnuPropertyFeatures {
bool shstk_supported = false;
};
class GnuPropertySection {
private:
[[maybe_unused]] GnuPropertyFeatures features_;
public:
LIBC_INLINE GnuPropertySection() = default;
bool parse(const ElfW(Phdr) * gnu_property_phdr, const ElfW(Addr) base);
LIBC_INLINE bool is_shstk_supported() const {
return features_.shstk_supported;
}
};
}
#endif