Improve debug binary location detection

This commit is contained in:
Justine Tunney 2023-11-16 23:26:05 -08:00
parent 68c7c9c1e0
commit 7a9e176ecf
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
17 changed files with 92 additions and 50 deletions

View file

@ -112,7 +112,7 @@ struct Loaded {
char *base;
char *entry;
Elf64_Ehdr eh;
Elf64_Phdr ph[30];
Elf64_Phdr ph[25];
};
static struct {
@ -277,8 +277,8 @@ static bool elf_slurp(struct Loaded *l, int fd, const char *file) {
return true;
}
static bool elf_load(struct Loaded *l, const char *file, long pagesz,
char *interp_path, size_t interp_size) {
static dontinline bool elf_load(struct Loaded *l, const char *file, long pagesz,
char *interp_path, size_t interp_size) {
int fd;
if ((fd = open(file, O_RDONLY | O_CLOEXEC)) == -1) {
return false;