Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Aug 2002 16:43:43 +0200
From:      =?iso-8859-1?Q?Alexander_Hav=E4ng?= <alexander@netintact.se>
To:        freebsd-current@freebsd.org
Subject:   kld - exporting symbols
Message-ID:  <20020806164343.D7805@Q.netintact.se>

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

Yesterday, we ditched linux and installed 4.6 on our dual xeon 2 Ghz development machine.
We're working in kernel space and figured kld modules would be a nice way to go.
We started porting our code from linux modules to kld, and found out that mutexes and such on 4.6 was
almost unheard of. But most of the other code worked just fine.

We have a situation where we first load module A.
Then we load module B, which calls a function from A.

This worked fine in 4.6, without EXPORT_SYMS or any of that.

Then today, we upgraded to 5.0-current, and tried the same code.
Now when kldloading module B, it says that the function it wants to call in A is an undefined symbol.

Browsing through the kmod.mk we found the EXPORT_SYMS directive, and tried using it.
The symbol ends up in the export_syms file, and nm(1) output shows that it's 't' in the .ko file.

But still it's undefined when we try to load B (which calls the function).

We also tried -export-all-symbols with ld, which turns the 't' into 'T', but that didn't work either.

Something broken, or would that be us? :)

//Alexander

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020806164343.D7805>