ELF: Ignore PT_EH_FRAME and PT_STACK.
This allows Clang builds (linked with our cross binutils) to at least start runtime_loader and then try to load launch_daemon. That fails with an infinite loop somewhere...
This commit is contained in:
@@ -322,6 +322,7 @@ typedef struct {
|
||||
#define PT_SHLIB 5
|
||||
#define PT_PHDR 6
|
||||
#define PT_TLS 7
|
||||
#define PT_EH_FRAME 0x6474e550
|
||||
#define PT_STACK 0x6474e551
|
||||
#define PT_RELRO 0x6474e552
|
||||
|
||||
|
||||
@@ -2283,6 +2283,7 @@ load_kernel_add_on(const char *path)
|
||||
// should check here for appropriate interpreter
|
||||
continue;
|
||||
case PT_PHDR:
|
||||
case PT_STACK:
|
||||
// we don't use it
|
||||
continue;
|
||||
default:
|
||||
|
||||
@@ -75,6 +75,7 @@ count_regions(const char* imagePath, char const* buff, int phnum, int phentsize)
|
||||
case PT_PHDR:
|
||||
// we don't use it
|
||||
break;
|
||||
case PT_EH_FRAME:
|
||||
case PT_RELRO:
|
||||
// not implemented yet, but can be ignored
|
||||
break;
|
||||
@@ -199,6 +200,7 @@ parse_program_headers(image_t* image, char* buff, int phnum, int phentsize)
|
||||
case PT_PHDR:
|
||||
// we don't use it
|
||||
break;
|
||||
case PT_EH_FRAME:
|
||||
case PT_RELRO:
|
||||
// not implemented yet, but can be ignored
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user