What s the difference between so la and a library files

0 votes

I know an .so file is a kind of dynamic library (lots of threads can share such libraries so there is no need to have more than one copy of it in memory). But what is the difference between .a and .la? Are these all static libraries?

If dynamic libs have big advantages over static ones, why there are still lots of static libraries? When should I try to build code into .so or .a?

[mirror@home ins_openvpn]$ ls lib/openvpn/plugins/ -l
total 96
-rw-r--r-- 1 mirror mirror 22892 Sep  2 23:25 openvpn-plugin-auth-pam.a
-rwxr-xr-x 1 mirror mirror   931 Sep  2 23:25 openvpn-plugin-auth-pam.la
-rwxr-xr-x 1 mirror mirror 23621 Sep  2 23:25 openvpn-plugin-auth-pam.so
-rw-r--r-- 1 mirror mirror 17228 Sep  2 23:25 openvpn-plugin-down-root.a
-rwxr-xr-x 1 mirror mirror   932 Sep  2 23:25 openvpn-plugin-down-root.la
-rwxr-xr-x 1 mirror mirror 18805 Sep  2 23:25 openvpn-plugin-down-root.so

Apr 25, 2022 in Linux Administration by Edureka
• 13,690 points
840 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
A.a file is a static library, but a.so file is a shared object (dynamic) library that functions similarly to a DLL on Windows.

There are two sorts of Linux C/C++ libraries that can be made:

Static libraries (.a) are object code libraries that are linked to and form part of an application.
Shared object libraries (.so) that are dynamically linked: This library only comes in one form, but it can be used in two ways.
At runtime, they are dynamically linked. During the compile/link phase, the libraries must be available. The executable component does not include the shared objects, yet they are related to the execution.
Using the dynamic linking loader system functions, dynamically loaded/unloaded and linked during execution (i.e. browser plug-in).
answered Apr 27, 2022 by Edureka
• 13,690 points

edited Mar 5

Related Questions In Linux Administration

0 votes
0 answers

What is the difference between a symbolic link and a hard link?

Recently I was asked this during a ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,680 points
455 views
0 votes
1 answer

What is the difference between ctrl z and ctrl c in command line?

Hi@akhtar, Generally, these two commands are used to ...READ MORE

answered Feb 24, 2020 in Linux Administration by MD
• 95,460 points
48,095 views
0 votes
0 answers

What is the difference between ''find .'' and ''find /'' on linux command

I am solving overthewire bandit. I looked ...READ MORE

Apr 20, 2022 in Linux Administration by Edureka
• 13,690 points
506 views
0 votes
1 answer

Difference between root (/) and home directory (~) in terminal?

Root directory which is referred to as ...READ MORE

answered Jun 20, 2019 in Linux Administration by Vicky
28,804 views
0 votes
0 answers

Difference between ctrl-z and "&" in linux

My understanding is that when you are ...READ MORE

Apr 13, 2022 in Linux Administration by Soham
• 9,710 points
532 views
0 votes
0 answers

Difference between "system" and "exec" in Linux?

What is the difference between system and ...READ MORE

Apr 26, 2022 in Linux Administration by Edureka
• 13,690 points
732 views
0 votes
1 answer

Difference between single and double quotes in Bash

Single statements will not add anything, however ...READ MORE

answered Jun 7, 2022 in Linux Administration by Korak
• 5,820 points
618 views
0 votes
1 answer

Difference between single and double quotes in Bash

Single statements will not insert anything, yet ...READ MORE

answered Jun 10, 2022 in Linux Administration by Korak
• 5,820 points
827 views
+1 vote
3 answers
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP