mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
d57b81aac7
- Add GetCpuCount() API to redbean - Add unix.gmtime() API to redbean - Add unix.readlink() API to redbean - Add unix.localtime() API to redbean - Perfect the new redbean UNIX module APIs - Integrate with Linux clock_gettime() vDSO - Run Lua garbage collector when malloc() fails - Fix another regression quirk with linenoise repl - Fix GetProgramExecutableName() for systemwide installs - Fix a build flake with test/libc/mem/test.mk SRCS list
34 lines
2 KiB
C
34 lines
2 KiB
C
#ifndef COSMOPOLITAN_LIBC_ELF_H_
|
|
#define COSMOPOLITAN_LIBC_ELF_H_
|
|
#include "libc/elf/struct/ehdr.h"
|
|
#include "libc/elf/struct/phdr.h"
|
|
#include "libc/elf/struct/shdr.h"
|
|
#include "libc/elf/struct/sym.h"
|
|
#include "libc/runtime/ezmap.internal.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
/*───────────────────────────────────────────────────────────────────────────│─╗
|
|
│ cosmopolitan § executable & linkable format ─╬─│┼
|
|
╚────────────────────────────────────────────────────────────────────────────│*/
|
|
|
|
char *GetElfStringTable(const Elf64_Ehdr *, size_t);
|
|
char *GetElfStrs(const Elf64_Ehdr *, size_t, size_t *);
|
|
Elf64_Sym *GetElfSymbolTable(const Elf64_Ehdr *, size_t, Elf64_Xword *);
|
|
bool IsElf64Binary(const Elf64_Ehdr *, size_t);
|
|
void CheckElfAddress(const Elf64_Ehdr *, size_t, intptr_t, size_t);
|
|
bool IsElfSymbolContent(const Elf64_Sym *);
|
|
Elf64_Phdr *GetElfSegmentHeaderAddress(const Elf64_Ehdr *, size_t, unsigned);
|
|
Elf64_Shdr *GetElfSectionHeaderAddress(const Elf64_Ehdr *, size_t, Elf64_Half);
|
|
void *GetElfSectionAddress(const Elf64_Ehdr *, size_t, const Elf64_Shdr *);
|
|
char *GetElfSectionNameStringTable(const Elf64_Ehdr *, size_t);
|
|
void GetElfVirtualAddressRange(const Elf64_Ehdr *, size_t, intptr_t *,
|
|
intptr_t *);
|
|
char *GetElfString(const Elf64_Ehdr *, size_t, const char *, Elf64_Word);
|
|
const char *GetElfSectionName(const Elf64_Ehdr *, size_t, Elf64_Shdr *);
|
|
Elf64_Sym *GetElfDynSymbolTable(const Elf64_Ehdr *, size_t, Elf64_Xword *);
|
|
char *GetElfDynStringTable(const Elf64_Ehdr *, size_t);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_ELF_H_ */
|