summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-05-16 20:00:28 +0000
committerpeter <peter@FreeBSD.org>2004-05-16 20:00:28 +0000
commitea4215c5218f4d79c33e806304e35cc951ea3dc7 (patch)
tree9c824fecb4de303fa016d7216c651ec04ecaec13 /sys/sys/linker.h
parent1eee96e5b10a90bb98c51684bf6fa7c4b4d1c57f (diff)
downloadFreeBSD-src-ea4215c5218f4d79c33e806304e35cc951ea3dc7.zip
FreeBSD-src-ea4215c5218f4d79c33e806304e35cc951ea3dc7.tar.gz
Make a small revision to the api between the elf linker core and the
elf_reloc() backends for two reasons. First, to support the possibility of there being two elf linkers in the kernel (eg: amd64), and second, to pass the relocbase explicitly (for relocating .o format kld files).
Diffstat (limited to 'sys/sys/linker.h')
-rw-r--r--sys/sys/linker.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/linker.h b/sys/sys/linker.h
index 3ea5718..1815c47 100644
--- a/sys/sys/linker.h
+++ b/sys/sys/linker.h
@@ -241,10 +241,11 @@ extern int kld_debug;
#endif
+typedef Elf_Addr elf_lookup_fn(linker_file_t, Elf_Word, int);
+
/* Support functions */
-int elf_reloc(linker_file_t _lf, const void *_rel, int _type);
-int elf_reloc_local(linker_file_t _lf, const void *_rel, int _type);
-Elf_Addr elf_lookup(linker_file_t, Elf_Word, int);
+int elf_reloc(linker_file_t _lf, Elf_Addr base, const void *_rel, int _type, elf_lookup_fn _lu);
+int elf_reloc_local(linker_file_t _lf, Elf_Addr base, const void *_rel, int _type, elf_lookup_fn _lu);
const Elf_Sym *elf_get_sym(linker_file_t _lf, Elf_Word _symidx);
const char *elf_get_symname(linker_file_t _lf, Elf_Word _symidx);
OpenPOWER on IntegriCloud