dynamic linker question

dynamic linker question

Post by Kelly Yance » Sat, 19 Dec 1998 04:00:00



  When loading a shared library using dlopen(), how would one call a
function in the main executable from the shared library (if it is
possible at all). So for example, the main executable would call
dlopen() to load the shared library; the shared library's _init()
routine is called in which it calls one or more routines provided my the
main executable.
  The only way I can figure to go it is to have the shared library
export a function which the main program invokes via dlsym() and passes
it pointers to the necessary functions so that the shared library's
routines can call them later. I guess what I am hoping is that there is
a cleaner solution, though.

  Thanks in advance,

  Kelly

--
Kelly Yancey                "Bill Gates is only a white Persian cat and

                             James Bond movie" - comedian Dennis Miller

 
 
 

1. BUG IN DYNAMIC LINKER .."bad dynamic tag".

Hi,

while compilling Mysql-3.22.32 and PHP4.0.2 under Linux 2.2.16,
libc-2.1.3-163,libelf-0.7.0-131, glib-1.2.8-57, glibdev-1.2.8-57 I'm
getting following error:
make[2]: Entering directory
`/usr/src/packages/SOURCES/mysql-3.22.32/readline'
rm -f libreadline.a
ar cru libreadline.a readline.o funmap.o keymaps.o vi_mode.o parens.o
rltty.o complete.o bind.o isearch.o display.o signals.o util.o kill.o
undo.o macro.o input.o callback.o terminal.o xmalloc.o history.o
histsearch.o histexpand.o histfile.o nls.o search.o shell.o tilde.o
BUG IN DYNAMIC LINKER ld.so: dynamic-link.h: 57: elf_get_dynamic_info:
Assertion `! "bad dynamic tag"' failed!
make[2]: *** [libreadline.a] Error 127

Can you point me to the right direction?
Thanks for any help
Regards
Leos

2. How to tell a valid address...

3. dynamic loading: linker bug w.r.t. --export-dynamic ?

4. FS: SCO VisionFS & Advanced Merge -- $50 for both

5. using the dynamic linker

6. Error running external procedure from oracle database

7. problems with dynamic linker

8. mapping a disk sector to a file

9. Can't load dynamic linker '/lib/ld.so'

10. can't load dynamic linker '/lib/ld.so'

11. Dynamic Linker ???

12. f77 linker and static/dynamic libs

13. dynamic linker error when starting Text_Editor.