LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* How to access linux symbols from dynamically loaded .so (dlopen)
@ 2005-09-14  9:12 Nishant Galange
  0 siblings, 0 replies; only message in thread
From: Nishant Galange @ 2005-09-14  9:12 UTC (permalink / raw)
  To: linuxppc-embedded

Hi all

Help needed desperately. Some background on the problem:

The embedded linux (built as one large elf
file) contains an important function called "board_init()"

A test module (built as a shared object test.so) contains a function
called start_test()

void start_test() {
=09board_init(); /* The shared object has to call a function defined in the=
 embedded linux elf image */
=09/*Do board tests here... */
}

1. Linux comes up to the command prompt on the board.
2. A GUI application communicates with the board via Ethernet=20
3. The GUI
transfers the test module test.so over Ethernet=20
4. The downloaded test.so is loaded via dlopen().=20
5. dlopen() and dlsym() calls succeed. start_test() starts executing=20
6. It barfs at board_init() saying "Undefined symbol: board_init"

So the dynamically loaded shared object cannot get a reference to a functio=
n define in the linux that loaded it...

How do we solve this problem? How do I make sure that symbols in the linux =
image are exposed to dynamically loaded libraries?

Most probably, it has a simple solution to tweak some compiler/linker
options. But I may be wrong...

Waiting,
Nishant

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-14 12:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-14  9:12 How to access linux symbols from dynamically loaded .so (dlopen) Nishant Galange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox