aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/linker.h
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2002-04-25 01:22:16 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2002-04-25 01:22:16 +0000
commitd297ad160e39eb30b95e90432e98732ba2e464ea (patch)
tree06955b3f6ae78c92827f72737fab4a079d4113d3 /sys/sys/linker.h
parentbacab7d655265b3195767552587863cae648abac (diff)
downloadsrc-d297ad160e39eb30b95e90432e98732ba2e464ea.tar.gz
src-d297ad160e39eb30b95e90432e98732ba2e464ea.zip
Don't use the symbol name to lookup the symbol value when we can use
the symbol index defined by the relocation. The elf_lookup() support function is to be used by elf_reloc() when symbol lookups need to be done. The elf_lookup() function operates on the symbol index and will do a symbol name based lookup when such is required, otherwise it uses the symbol index directly. This solves the problem seen on ia64 where the symbol hash table does not contain local symbols and a symbol name based lookup would fail for those symbols. Don't pass the symbol name to elf_reloc(), as it isn't used any more.
Notes
Notes: svn path=/head/; revision=95410
Diffstat (limited to 'sys/sys/linker.h')
-rw-r--r--sys/sys/linker.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/sys/linker.h b/sys/sys/linker.h
index f138df7519a8..3b3edca33a0f 100644
--- a/sys/sys/linker.h
+++ b/sys/sys/linker.h
@@ -226,8 +226,9 @@ extern int kld_debug;
#endif
/* Support functions */
-int elf_reloc(linker_file_t _lf, const void *_rel, int _type,
- const char *_sym);
+int elf_reloc(linker_file_t _lf, const void *_rel, int _type);
+Elf_Addr elf_lookup(linker_file_t, Elf_Word, int);
+
/* values for type */
#define ELF_RELOC_REL 1
#define ELF_RELOC_RELA 2