summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/bootstrap.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-02-23 18:33:50 +0000
committermarcel <marcel@FreeBSD.org>2008-02-23 18:33:50 +0000
commit130ba03346e0f4dde810a1dda76938136cd213a2 (patch)
tree2f2f020fb905a21e5658011654a29381e809f544 /sys/boot/common/bootstrap.h
parent2c03940da71ecf47c9df930f702a6165a027a60c (diff)
downloadFreeBSD-src-130ba03346e0f4dde810a1dda76938136cd213a2.zip
FreeBSD-src-130ba03346e0f4dde810a1dda76938136cd213a2.tar.gz
Add __elfN(relocation_offset). It holds the offset between the virtual
(link) address and the physical (load) address. Ideally, the mapping between link and load addresses should be abstracted by the copyin(), copyout() and readin() functions, so that we don't have to add kluges in __elfN(loadimage)(). Then, we could also have paged virtual memory for the kernel. This can be important under EFI, where you need to allocate physical memory form the firmware if you want to work in all scenarios.
Diffstat (limited to 'sys/boot/common/bootstrap.h')
-rw-r--r--sys/boot/common/bootstrap.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h
index 6ecd235..57982d1 100644
--- a/sys/boot/common/bootstrap.h
+++ b/sys/boot/common/bootstrap.h
@@ -233,13 +233,15 @@ void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p)
int file_addmodule(struct preloaded_file *fp, char *modname, int version,
struct kernel_module **newmp);
-
/* MI module loaders */
#ifdef __elfN
/* Relocation types. */
#define ELF_RELOC_REL 1
#define ELF_RELOC_RELA 2
+/* Relocation offset for some architectures */
+extern u_int64_t __elfN(relocation_offset);
+
struct elf_file;
typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Size symidx);
OpenPOWER on IntegriCloud