Re: kernel panic with freebsd-image 7.2-5 (i386)
# ./binutils_2.19.51.20090508/lib/modules/7.2-1-486/acpi.ko
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x54008 0x54008 R E 0x1000
LOAD 0x054008 0x00055008 0x00055008 0x02414 0x03c84 RW 0x1000
DYNAMIC 0x054008 0x00055008 0x00055008 0x00078 0x00078 RW 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
# ./7.2-4_which_works/lib/modules/7.2-1-486/acpi.ko
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x54914 0x54914 R E 0x1000
LOAD 0x055000 0x00055000 0x00055000 0x0241c 0x03c8c RW 0x1000
DYNAMIC 0x055000 0x00055000 0x00055000 0x00078 0x00078 RW 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
The working have the 2nd line aligned, while the failing does not.
The working have VirtAddr/PhysAddr same as Offset,
while the failing does not.
It is unclear for me, whether it is allowed for modules in general
(I suppose yes) and especially for acpi.ko, which is loaded specially.
Please, could you apply hack bellow (add "-z common-page-size=8192"),
build the kernel, check Program Headers of acpi.ko and give it a try ?
Petr
--- kfreebsd-7/debian/patches/020_linker.diff
+++ kfreebsd-7/debian/patches/020_linker.diff
@@ -29,7 +29,7 @@
${FULLPROG}: ${KMOD}.kld
- ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld
+ gen-ld-u-options ${KMOD}.kld > ${KMOD}.lopt
-+ ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld "@${KMOD}.lopt"
++ ${LD} -z common-page-size=8192 -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld "@${KMOD}.lopt"
.if !defined(DEBUG_FLAGS)
${OBJCOPY} --strip-debug ${.TARGET}
.endif
Reply to: