|
Home > Archive > Unix Programming > May 2007 > How to check out the contents of a .so file in Solaris?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to check out the contents of a .so file in Solaris?
|
|
| linq936@hotmail.com 2007-05-17, 7:18 pm |
| Hi,
I am writing software on saloris and in linking the final
executable, I get error saying "Undefined first referenced" and they
are all from one .so file.
The structure is like this:
1.c ==compiled into ==> 1.so ==built into==> 2.so
The error message is saying symbols declared and defined in 1.c are
not defined.
So is there a way to check the contents of 2.so to see if 1.so is in
it? And further if those symbols are in 2.so?
Thanks!
| |
| Ian Collins 2007-05-18, 1:18 am |
| linq936@hotmail.com wrote:
> Hi,
> I am writing software on saloris and in linking the final
> executable, I get error saying "Undefined first referenced" and they
> are all from one .so file.
>
How are you building and how are you linking?
--
Ian Collins.
| |
| Paul Pluzhnikov 2007-05-18, 1:18 am |
| linq936@hotmail.com writes:
> 1.c ==compiled into ==> 1.so ==built into==> 2.so
You can't build 1.so into 2.so on any UNIX system except AIX (and
even then only with some hacks).
On most other UNIXes (including Solaris) the .so file is "fully
prepared"; you can't build it into anything, you can only use it.
> The error message is saying symbols declared and defined in 1.c are
> not defined.
Probably because they aren't.
> So is there a way to check the contents of 2.so
You can see which symbols it defines with 'nm'.
> to see if 1.so is in it?
I can tell you right away -- it isn't.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
| |
| linq936@hotmail.com 2007-05-18, 1:23 pm |
| On May 17, 7:31 pm, Paul Pluzhnikov <ppluzhnikov-...@charter.net>
wrote:
> linq...@hotmail.com writes:
>
> You can't build 1.so into 2.so on any UNIX system except AIX (and
> even then only with some hacks).
>
> On most other UNIXes (including Solaris) the .so file is "fully
> prepared"; you can't build it into anything, you can only use it.
>
>
> Probably because they aren't.
>
>
> You can see which symbols it defines with 'nm'.
>
>
> I can tell you right away -- it isn't.
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.
Yes, you are right. I checked again, it is like this:
1.h declares function
1.c == compiled into ==> 1.so
2.c includes 1.h and calls functions defined in 1.c and 2.c is
compiled into 2.so.
Now in linking the final executable, I get "Undefined first
referenced" from 2.so and the errors are all from 1.c. I checked the
command line, 1.so is not there. This explains it.
Thanks a lot.
|
|
|
|
|