mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 03:26:10 +00:00
LibELF+LibC: Support building LibELF for 64-bit targets
This commit is contained in:
parent
e468bf08b1
commit
fdbe66a7b4
Notes:
sideshowbarker
2024-07-18 18:45:41 +09:00
Author: https://github.com/gunnarbeutner
Commit: fdbe66a7b4
Pull-request: https://github.com/SerenityOS/serenity/pull/6803
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/awesomekling
3 changed files with 45 additions and 39 deletions
|
@ -11,17 +11,22 @@
|
|||
#else
|
||||
# include <elf.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define ElfW(type) Elf32_##type
|
||||
#ifdef __LP64__
|
||||
# define ElfW(type) Elf64_##type
|
||||
#else
|
||||
# define ElfW(type) Elf32_##type
|
||||
#endif
|
||||
|
||||
struct dl_phdr_info {
|
||||
Elf32_Addr dlpi_addr;
|
||||
ElfW(Addr) dlpi_addr;
|
||||
const char* dlpi_name;
|
||||
const Elf32_Phdr* dlpi_phdr;
|
||||
Elf32_Half dlpi_phnum;
|
||||
const ElfW(Phdr) * dlpi_phdr;
|
||||
ElfW(Half) dlpi_phnum;
|
||||
};
|
||||
|
||||
int dl_iterate_phdr(int (*callback)(struct dl_phdr_info* info, size_t size, void* data), void* data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue