Support ELF64 in the kernel.
This has been done by adding typedefs in elf_common.h to the correct ELF structures for the architecture, and changing all Elf32_* uses to those types. I don't know whether image loading works as I cannot test it yet, there may be some 64-bit safety issues around. However, symbol lookup for the kernel is working correctly.
This commit is contained in:
@@ -152,12 +152,12 @@ typedef struct image_queue_t {
|
||||
#define IMAGE_FLAG_RTLD_MASK 0x03
|
||||
// RTLD_{LAZY,NOW} | RTLD_{LOCAL,GLOBAL}
|
||||
|
||||
#define STRING(image, offset) ((char *)(&(image)->strtab[(offset)]))
|
||||
#define STRING(image, offset) ((char*)(&(image)->strtab[(offset)]))
|
||||
#define SYMNAME(image, sym) STRING(image, (sym)->st_name)
|
||||
#define SYMBOL(image, num) (&(image)->syms[num])
|
||||
#define HASHTABSIZE(image) ((image)->symhash[0])
|
||||
#define HASHBUCKETS(image) ((unsigned int *)&(image)->symhash[2])
|
||||
#define HASHCHAINS(image) ((unsigned int *)&(image)->symhash[2+HASHTABSIZE(image)])
|
||||
#define HASHBUCKETS(image) ((unsigned int*)&(image)->symhash[2])
|
||||
#define HASHCHAINS(image) ((unsigned int*)&(image)->symhash[2+HASHTABSIZE(image)])
|
||||
|
||||
|
||||
// The name of the area the runtime loader creates for debugging purposes.
|
||||
|
||||
Reference in New Issue
Block a user