View Single Post

   
  #5 (permalink)  
Old 01-04-2008, 09:24 PM
sunil
 
Posts: n/a
Default Re: Checking for unresolved symbols

Thanks for all of your responses. Here is the situation
(These compile/link lines are not accurate.I am a newbie to AIX/IBM, I
am using these commands to just explain problem in simple terms)
cc -o main main.c -lmylib -llib1 -llib2
cc -c mylib.c
ld -G -o libmylib.so mylib.o
Now I modify mylib.c to make a call to function foo()
foo() is defined in liblib3.so that was not linked above. Since
linking takes a long time in my case (I have some 60 libraries) I want
to relink only if necessary.
So now I recompile mylib.c and rebuild mylib.so.
I want to relink executable only if needed. On SUN I can do this as:
ldd -r main | grep "symbol not found" and if this succeeds relink.
Is it possible to do something like this on AIX?
Thanks,
Sunil.
"Gary R. Hook" <nospam@nospammers.net> wrote in message news:<cHUPb.2594$nD7.909785248@newssvr11.news.prod igy.com>...
> sunil wrote:
>
> > I build my task using a shared obj.

>
> Do you mean you built your program? I.e. main executable? Or
> do you mean you've built a shared (loadable) module?
>
> Now I make a call to some
> > function in some library in one of the source files that make up the
> > shared object. However the library that is satisfying this dependency
> > was not linked when task was built.

>
> You normally can't do this on AIX. By default, all references
> are required to be resolved at link time. If you're missing
> a definition, you'll know about it when the module gets built.
> All that said, I would strongly suggest _not_ using the -brtl
> option until you're more comfortable with constructing
> applications on AIX.
>
> Also, for more info see
> http://www-106.ibm.com/developerwork...dfs/aix_ll.pdf

Reply With Quote