Difference amoung .a .o and .so


 
Thread Tools Search this Thread
Top Forums Programming Difference amoung .a .o and .so
# 1  
Old 06-23-2008
Difference amoung .a .o and .so

Hi,

Any one pls let me know the difference amoung .a .o and .so in AIX environment.

Thanks,
NagaSmilie
# 2  
Old 06-23-2008
.o file - the unlinked output of the compiler - an object file

.a - out of using ar to "pack" several .o files into an object archive file. It is an efficient way of keeping track of and being able to access object modules during the link edit phase of compilation.

.so - shared object library - created by the linker from .o files. These shared libraries
are loaded into memory and accessed (all at one time) by lots of processes in the system. This saves memory.

And we do not do homework here, but it was hard for me to tell on this question.
# 3  
Old 06-24-2008
Thanks Jim for your prompt reply. Now it's cleared.

-NagaSmilie
# 4  
Old 06-25-2008
Another way of reasoning about the differences is that .a files are linked in at compile time and .so files are linked in at run time.

So when you compile a source file that calls functions in a .a file the code for those functions gets included, but when you call functions in a .so file they get included when you run the program.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to calculate difference of split and sum the difference

In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13. I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. Programming

what is the main difference between difference between using nonatomic lseek and O_APPEND

I think both write at the end of the file ...... but is there a sharp difference between those 2 instruction ..... thank you this is my 3rd question today forgive me :D (1 Reply)
Discussion started by: fwrlfo
1 Replies

3. Shell Programming and Scripting

What's the difference between $* and $@ ?

What's the difference between $* and $@? And I read that the $* has security problems, why? (6 Replies)
Discussion started by: Henryyy
6 Replies

4. UNIX for Dummies Questions & Answers

the difference is?

scp 123.txt user1@computer1.com:..//john_x1/lab scp 123.txt user1@computer1.com:../john_x1/lab What is the difference between single and slash here and in general? How to copy if we have a unique directory somewhere? Is some of above ways more prefered or... better solutions exists??? ... (8 Replies)
Discussion started by: c_lady
8 Replies

5. Shell Programming and Scripting

difference between > and 2>

Hi could you please tell me, what is the difference between this two urgently (2 Replies)
Discussion started by: lnviyyapu
2 Replies

6. Shell Programming and Scripting

Difference between 1,$ and /g

just wondering what the difference is between 1,$ and /g when doing a substitution in vi. doesn't seem to be much difference from what i can see. (2 Replies)
Discussion started by: bigubosu
2 Replies

7. Shell Programming and Scripting

does someone see the difference

this works (session is set in -x) @@ecar0o:/html/dbs/public/cgi-bin> ssh ecar0o.bc -l oracle ssh cas_a "find /casa/dbcrea/`echo casa | cut -c 1-3`/rel55595 -type f ! -name '*.dbf' -exec ls -l {} \\\\\;" + cut -c 1-3 + echo casa + ssh ecar0o.bc -l oracle ssh cas_a find... (1 Reply)
Discussion started by: plelie2
1 Replies

8. UNIX for Advanced & Expert Users

Amoung tar and gzip whiich unix command is more practical with respect to space manag

Hi All Can any body help me out. Amoung tar and gzip whiich unix command is more practical with respect to space management and file restoration. Eg if I use tar or gzip which will be more helpful to reduce the space and during the file restoration. Please help me out. regards... (3 Replies)
Discussion started by: manas6
3 Replies

9. Shell Programming and Scripting

Difference between $* and $@

Somebody please tell me the difference between $@ and $* Thanks in advance. Saneesh Joseph (1 Reply)
Discussion started by: saneeshjose
1 Replies

10. Linux

what is the difference between -h and -H ?

samba:/home/backup # df -h /home/ Filesystem Size Used Avail Use% Mounted on /dev/sdb2 34G 8.6G 26G 26% /home samba:/home/backup # df -H /home/ Filesystem Size Used Avail Use% Mounted on /dev/sdb2 37GB 9.2GB 28GB 26% /home what... (2 Replies)
Discussion started by: cw1972
2 Replies
Login or Register to Ask a Question