Date: Tue, 23 Apr 2002 00:22:44 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: arch@FreeBSD.org Subject: RTLD fix: part 1: kernel modules Message-ID: <20020423072244.GA40461@athlon.pn.xcllnt.net>
next in thread | raw e-mail | index | archive | help
Gang, The attached diff is primarily created to resolve a RTLD problem on ia64, but should prevent other architectures from the same and also (potentially) improve dynamic linking performance. The bottom line is this: On ia64, local symbols are not added to the hash table. My guess is that the rationale is that if the symbol exists only for relocation purposes, then you don't need to do a lookup because the relocation has the index of the symbol. Provided that linkers will not do lookups when not needed, this is safe. Unfortunately, we always do lookups (hash based). As such, we got unresolved symbols even though the symbol was in the symbol table; just not in the hash table. The attached diff changes the way we relocate for ELF. We don't pass the symbol name to elf_reloc anymore, because the relocation contains the index of the symbols. A new support function is created that does the lookup given the symbol index. For local symbols this is trivial. For global symbols we can avoid lookups in the future by being more smart. The second part is a similar change to ld-elf.so. I haven't looked at that yet. Compiles for alpha, i386 and ia64 Tested on ia64 Please review, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020423072244.GA40461>