summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-04-25 01:22:16 +0000
committermarcel <marcel@FreeBSD.org>2002-04-25 01:22:16 +0000
commit56d625090ed627a480bc1b8c3253e4cb4c48ec41 (patch)
tree06955b3f6ae78c92827f72737fab4a079d4113d3 /sys/sys/linker.h
parent12a8faa64a26e5dcfde6ae295040e0fe4aa5afe1 (diff)
downloadFreeBSD-src-56d625090ed627a480bc1b8c3253e4cb4c48ec41.zip
FreeBSD-src-56d625090ed627a480bc1b8c3253e4cb4c48ec41.tar.gz
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.
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 f138df7..3b3edca 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
OpenPOWER on IntegriCloud