From: "Nishant Galange" <nishant.subs@myrealbox.com>
To: linuxppc-embedded@ozlabs.org
Subject: How to access linux symbols from dynamically loaded .so (dlopen)
Date: Wed, 14 Sep 2005 09:12:03 +0000 [thread overview]
Message-ID: <1126689123.c803515cnishant.subs@myrealbox.com> (raw)
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
reply other threads:[~2005-09-14 12:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1126689123.c803515cnishant.subs@myrealbox.com \
--to=nishant.subs@myrealbox.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox