I have a kernel extension that started getting duplicate symbol warnings
when I moved from AIX 4.3.2 to 4.3.3. Here is what I am seeing:
/bin/ld -b"binder:/usr/lib/bind
glink:/lib/glink.o" -H512 -T512 -lcsys -lsys -bmap:xxxx.m -bl:xxxx.lm -bI:/l
ib/kernex.exp -bI:/lib/syscalls.exp -exx_config <list of object files that
were compiled properly for a kernel extension>
ld: 0711-224 WARNING: Duplicate symbol: .trchook
ld: 0711-224 WARNING: Duplicate symbol: trchook
ld: 0711-344 See the loadmap file xxxx.lm for more information.
After looking into it, I think the duplicate symbol warnings stem from the
"trchook" symbol being added to kernex.exp in 4.3.3. The symbol was already
in syscalls.exp since 4.3.2. I am importing it twice, once from kernex.exp
and once from syscalls.exp, and so that is why I am getting the duplicate
symbol warning. Does that sound right? The warnings don't cause any
problems with the code, but I'd like to get rid of them if I can. But I
don't think I'm doing anything wrong to generate these warnings. I saw that
last October JG posted a similar problem. The only reply was:
If I don't use syscalls.exp I get a lot of undefined symbols. I looked atQuote:>For a device driver or kernel extension, you shouldn't need
>to use syscalls.exp. Only symbols listed in kernex.exp
>are available to your kernel module.
the AIX 4.3 documenation in the book "AIX Version 4.3 Kernel Extensions and
Device Support Programming Concepts", and here is a sentence straight from
Chapter1:
Kernel extensions can bind to a restricted set of base system calls. Binding
is done by specifying the syscalls.exp system call export file as an import
file when the kernel extension is link-edited.
So if I understand correctly, using syscalls.exp should be OK. Is there
anything I can do to get rid of these warnings?
Thanks in advance,
BR