elf_parser.h 387 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) 2021 Ant Group. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _ELF_PARSER_H_
  6. #define _ELF_PARSER_H_
  7. #include <stdbool.h>
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. bool
  12. is_ELF(void *buf);
  13. bool
  14. is_ELF64(void *buf);
  15. bool
  16. get_text_section(void *buf, uint64_t *offset, uint64_t *size);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif