git: kernel: Fix loading of gold-linked modules
John Marino
marino at crater.dragonflybsd.org
Mon Sep 21 17:13:07 PDT 2015
commit d9d18ebc0ddd2b317ff8e4548b0b310941169f18
Author: John Marino <draco at marino.st>
Date: Tue Sep 22 02:03:26 2015 +0200
kernel: Fix loading of gold-linked modules
Kernel modules linked by gold differed from those modules linked by ld.bfd in that
the .note.GNU-stack section on ld.bfd were set as size "1" whereas on gold this section
was size "0". The object loading code was not set handle sizes less than 1, causing
module loading failure.
The fix of ensuring the smallest alignment to be zero by checking for -1 is required
over FreeBSD's technique of continuing if the section size is zero because an internal
check causes a "lost progbits" panic when FreeBSD's method is used.
This adjustment should enable a fully functional world and kernel to be built by gold
linker using WORLD_LDVER=ld.gold in make.conf. Before this, only the world worked;
the kernel could not be booted.
Approved by: dillon
Summary of changes:
sys/kern/link_elf_obj.c | 4 ++++
1 file changed, 4 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d9d18ebc0ddd2b317ff8e4548b0b310941169f18
--
DragonFly BSD source repository
More information about the Commits
mailing list