Bug 192253

Summary: [INCOMPLETE] [PATCH] Add GNU hash support to kernel link_elf, kldxref
Product: Base System Reporter: Conrad Meyer <cse.cem>
Component: kernAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me CC: cem, emaste
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
(patch -p1 in src/ ; applies against recent-ish CURRENT) none

Description Conrad Meyer 2014-07-29 20:09:35 UTC
Created attachment 145127 [details]
(patch -p1 in src/ ; applies against recent-ish CURRENT)

This incomplete patch ports r234841 (GNU hash for rtld-elf) to the kernel linker and kldxref ELF implementations. To finish the work, someone will have to port support to the bootloader as well (OR, switch '--hash-style=gnu' to '--hash-style=both' and eat the additional hash table bloat).

We abandoned this route because it doesn't help very much on AMD64 (relocatable ELF object kmodules do not get any hash table) and we got 99.9% of the gains we wanted with the patch in bug 192249. Also, it is obnoxious how many different ELF implementations exist and most of them lack GNU hash support (bug 192252).

Still, maybe this is useful to someone or other (embedded?) architectures where kernel modules are proper shared objects.

Sponsored by:	EMC / Isilon storage division