No one have tried to implement modules on his apps? Or know how to do it? thanks once again,.. and sorry to insist, but i'm lost here :( On Tue, Jul 28, 2009 at 9:30 PM, Alberich de megres<alberich2k5@xxxxxxxxx> wrote: > I know it's been a long since i first send my question.. but i'm still stucked. > Versioning symbols does not add them to dynsym table. > > Maybe i explained myself in the wrong way: > > - I got host program P, with its functions and i want only one to be > seen by modules (function F). > > - In the other side i got a program M (module), that is loaded by P > and then it uses the F function from P. > > If i compile with -rdynamic option in gcc, it works fine but it > exports all the functions on .dynsym. > > Using versioning, and adding this on my code: > > __asm__(".symver F, F@"); > > Only adds F@ to .symtab, but not to .dynsym. So when executing the > program i get the following message: > > ./main: symbol lookup error: ../mod/log: undefined symbol: F > > > And i tried to --dynamic-list option.. but with no results. > > Any idea or tip?? > > Thanks!! > > > > On Sat, Apr 25, 2009 at 11:15 PM, Andi Hellmund<mail@xxxxxxxxxxxxxxxx> wrote: >> Ian Lance Taylor wrote: >>> Alberich de megres <alberich2k5@xxxxxxxxx> writes: >>> >>> >>>> but i just want to export some of symbol on main.c. Is it some way to >>>> control which symbols i export? >>>> >>> >>> http://sourceware.org/binutils/docs-2.19/ld/VERSION.html >>> >>> Ian >>> >>> >> Beside the versioning of symbols, you could also use use one of the >> following ld commands (check out the man page for more details): >> >> --exclude-symbols symbol,symbol,... >> >> --dynamic-list=dynamic-list-file >> >> If you are using gcc for linking, then prepend -Wl, to the command, like >> -Wl,--exclude-symbols,... >> >> Hope that helps and best regards, >> Andi >> >> >