Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2015 03:30:20 +0000
From:      "Sinha, Prokash" <psinha@panasas.com>
To:        freebsd-toolchain <freebsd-toolchain@freebsd.org>
Subject:   elf linking problem
Message-ID:  <D0DDC5CA.45E0%psinha@panasas.com>

next in thread | raw e-mail | index | archive | help
Hello,

I'm trying to find out what could be the cause of a kldload problem I'm
facing. Here is the context detail --


1. I'm building two ko module. And it has a dependency order, so when I
load the first module, it loads, and a function symbol ( F ) is defined
into kernel variable space sysctl -b kern.function_list | tr '\0' '\n' |
grep symname.
2. Now trying to load the 2nd module, and link_elf_obj flags error and
symbol undefined when freebsd10.1 is being used.
3. If I probe using the same sysctl as in step 1, I still the symbol is
defined.

/var/log/messages shows -
kernel: link_elf_obj: symbol pan_sys_once undefined
kernel: linker_load_file: Unsupported file type

The same two modules when complied using freebsd7.2, we don't see the
problem.


The question is - Is there changes along the elf formats ( in both case it
64bit), also is there any changes
In the API between those two OS version, that I need to aware of ( and
possible flags I need to set).

Using objdump -t  modone.ko
00000000000fb940 g     F .text	0000000000000062 pan_sys_once



In modtwo.ko it is undefined
0000000000000000         *UND*	0000000000000000 pan_sys_once


Note the objdump on freebsd 7.2, is identical. So it is defined in the
module1 as F(function), and undefined(UND) in module two.

Any suggestion, please ?

Thanks,
-prokash





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D0DDC5CA.45E0%psinha>