mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Improve debug binary location detection
This commit is contained in:
parent
68c7c9c1e0
commit
7a9e176ecf
17 changed files with 92 additions and 50 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue