Subject: ld + ksyms problem
To: None <current-users@netbsd.org>
From: Peter Postma <peter@pointless.nl>
List: current-users
Date: 05/04/2004 14:49:44
I've a problem with ld (from -current, binutils 2.14) and /dev/ksyms.
ld coredumps when I load a LKM:
% sudo modload -f -d /usr/lkm/msdosfs.o
ld -R /dev/ksyms -e msdosfs_lkmentry -o /usr/lkm/msdosfs -Ttext 0x0 /usr/lkm/msdosfs.o
[1] Segmentation fault (core dumped) ld -R /dev/ksyms...
modload: can't prelink `/usr/lkm/msdosfs.o' creating `/usr/lkm/msdosfs'
But using ld with -R /netbsd works. I've modified modload to ignore ksyms
and with this loading LKM's just works.
ld version:
% ld -V
GNU ld version 2.14 20030612
Supported emulations:
elf64_sparc
elf32_sparc
sparcnbsd
I've tried ld from binutils 2.13.2 and this seem to work with ksyms:
% sudo modload -f -d /usr/lkm/msdosfs.o
ld -R /dev/ksyms -e msdosfs_lkmentry -o /usr/lkm/msdosfs -Ttext 0x0 /usr/lkm/msdosfs.o
.text: addr = 0x0 size = 0x8a48 align = 0x8
.shstrtab: addr = 0x0 size = 0x70 align = 0x1
.symtab: addr = 0x0 size = 0x238c8 align = 0x8
[lot of output]
modentry = 0x85b4000
Module loaded as ID 0
% ld -V
GNU ld version 2.13.2
Supported emulations:
elf64_sparc
elf32_sparc
This is on 2.0E sparc64 but I'm seeing the same problem on i386.
PR bin/25298 (closed) also has this problem.
Is anyone else having this problem?
--
Peter Postma