diff options
author | obrien <obrien@FreeBSD.org> | 2008-07-11 01:10:40 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2008-07-11 01:10:40 +0000 |
commit | 3b9db50b75a7bbffc2bcab3be2584d5d7cfbd81e (patch) | |
tree | cb958bb7ae66ead28d3da5fe1193edd5021c536f /sys/kern/link_elf.c | |
parent | 0b350b7aacb33b24f6e728140304d169a4ef31cf (diff) | |
download | FreeBSD-src-3b9db50b75a7bbffc2bcab3be2584d5d7cfbd81e.zip FreeBSD-src-3b9db50b75a7bbffc2bcab3be2584d5d7cfbd81e.tar.gz |
Revert r180431.
r180431 broke the AMD64 build (the only arch using kern/link_elf_obj.c)
Diffstat (limited to 'sys/kern/link_elf.c')
-rw-r--r-- | sys/kern/link_elf.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index a347ad4..2664ba9 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -71,6 +71,48 @@ __FBSDID("$FreeBSD$"); #define MAXSEGS 4 +typedef struct elf_file { + struct linker_file lf; /* Common fields */ + int preloaded; /* Was file pre-loaded */ + caddr_t address; /* Relocation address */ +#ifdef SPARSE_MAPPING + vm_object_t object; /* VM object to hold file pages */ +#endif + Elf_Dyn* dynamic; /* Symbol table etc. */ + Elf_Hashelt nbuckets; /* DT_HASH info */ + Elf_Hashelt nchains; + const Elf_Hashelt* buckets; + const Elf_Hashelt* chains; + caddr_t hash; + caddr_t strtab; /* DT_STRTAB */ + int strsz; /* DT_STRSZ */ + const Elf_Sym* symtab; /* DT_SYMTAB */ + Elf_Addr* got; /* DT_PLTGOT */ + const Elf_Rel* pltrel; /* DT_JMPREL */ + int pltrelsize; /* DT_PLTRELSZ */ + const Elf_Rela* pltrela; /* DT_JMPREL */ + int pltrelasize; /* DT_PLTRELSZ */ + const Elf_Rel* rel; /* DT_REL */ + int relsize; /* DT_RELSZ */ + const Elf_Rela* rela; /* DT_RELA */ + int relasize; /* DT_RELASZ */ + caddr_t modptr; + const Elf_Sym* ddbsymtab; /* The symbol table we are using */ + long ddbsymcnt; /* Number of symbols */ + caddr_t ddbstrtab; /* String table */ + long ddbstrcnt; /* number of bytes in string table */ + caddr_t symbase; /* malloc'ed symbold base */ + caddr_t strbase; /* malloc'ed string base */ + caddr_t ctftab; /* CTF table */ + long ctfcnt; /* number of bytes in CTF table */ + caddr_t ctfoff; /* CTF offset table */ + caddr_t typoff; /* Type offset table */ + long typlen; /* Number of type entries. */ +#ifdef GDB + struct link_map gdb; /* hooks for gdb */ +#endif +} *elf_file_t; + #include <kern/kern_ctf.c> static int link_elf_link_common_finish(linker_file_t); @@ -184,6 +226,11 @@ link_elf_delete_gdb(struct link_map *l) Elf_Addr link_elf_get_gp(linker_file_t); #endif +/* + * The kernel symbol table starts here. + */ +extern struct _dynamic _DYNAMIC; + static void link_elf_error(const char *filename, const char *s) { |