168:
same flexibility that permits an upgraded library to benefit all dynamically-linked applications can also prevent applications that assume the presence of a specific version of a particular library from running correctly. If every application on a system must have its own copy of a dynamic library to ensure correct operation, the benefits of dynamic linking are moot.
126:, or the postponing of the resolving of some undefined symbols until a program is run. That means that the executable still contains undefined symbols, plus a list of objects or libraries that will provide definitions for these. Loading the program will load these objects/libraries as well, and perform a final linking.
171:
Another benefit of static builds is their portability: once the final executable file has been compiled, it is no longer necessary to keep the library files that the program references, since all the relevant parts are copied into the executable file. As a result, when installing a statically-built
167:
Static builds have a very predictable behavior (because they do not rely on the particular version of libraries available on the final system), and are commonly found in forensic and security tools to avoid possible contamination or malfunction due to broken libraries on the examined machine. The
101:
program then resolves references to undefined symbols by finding out which other object defines a symbol in question, and replacing placeholders with the symbol's address. Linkers can take objects from a collection called a
108:. The final program does not include the whole library, only those objects from it that are needed. Libraries for diverse purposes exist, and one or more system libraries are usually linked in by default.
140:
If a library is upgraded or replaced, all programs using it dynamically will immediately benefit from the corrections. Static builds would have to be re-linked first.
245:
235:
271:
172:
program on a computer, the user doesn't have to download and install additional libraries: the program is ready to run.
276:
186:
122:
104:
83:
that are present in the module represented by the object, and which should be available for use by other modules.
93:
symbols are functions or variables that are called or referenced by this object, but not internally defined.
80:
76:
226:. The Morgan Kaufmann Series in Software Engineering and Programming (1 ed.). San Francisco, USA:
98:
41:
241:
231:
196:
134:
117:
37:
227:
201:
191:
219:
206:
181:
265:
161:
57:
137:) need to be stored in only one location, not duplicated in every single binary.
45:
144:
53:
49:
21:
160:
program, no dynamic linking occurs: all the bindings have been done at
147:
file size is smaller than its statically linked counterpart.
56:
program. The objects are program modules containing
255:Building And Using Static And Shared "C" Libraries
8:
64:definitions, which come in two varieties:
129:Dynamic linking offers three advantages:
257:. Little Unix Programmers Group (LUPG).
133:Often-used libraries (for example the
7:
24:version of a program which has been
52:and assembling them into a single
14:
1:
28:linked against libraries.
293:
44:means taking one or more
135:standard system library
272:Compiler construction
253:Keren, Guy (2002).
224:Linkers and Loaders
120:environments allow
277:Computer libraries
246:978-1-55860-496-4
284:
258:
249:
197:Relocation table
158:statically built
118:operating system
38:computer science
292:
291:
287:
286:
285:
283:
282:
281:
262:
261:
252:
238:
228:Morgan Kaufmann
220:Levine, John R.
218:
215:
202:Runtime library
192:Name decoration
178:
154:
152:Static building
123:dynamic linking
114:
112:Dynamic linking
34:
12:
11:
5:
290:
288:
280:
279:
274:
264:
263:
260:
259:
250:
236:
214:
211:
210:
209:
207:Runtime system
204:
199:
194:
189:
184:
182:Static library
177:
174:
153:
150:
149:
148:
141:
138:
113:
110:
95:
94:
84:
33:
30:
13:
10:
9:
6:
4:
3:
2:
289:
278:
275:
273:
270:
269:
267:
256:
251:
247:
243:
239:
237:1-55860-496-0
233:
229:
225:
221:
217:
216:
212:
208:
205:
203:
200:
198:
195:
193:
190:
188:
185:
183:
180:
179:
175:
173:
169:
165:
163:
159:
151:
146:
142:
139:
136:
132:
131:
130:
127:
125:
124:
119:
111:
109:
107:
106:
100:
92:
88:
85:
82:
78:
74:
70:
67:
66:
65:
63:
59:
55:
51:
48:generated by
47:
43:
39:
31:
29:
27:
23:
19:
254:
223:
170:
166:
162:compile time
157:
155:
128:
121:
115:
103:
96:
90:
86:
75:symbols are
72:
68:
61:
58:machine code
35:
25:
18:static build
17:
15:
143:The binary
266:Categories
213:References
145:executable
54:executable
26:statically
222:(2000) .
87:Undefined
81:variables
77:functions
50:compilers
176:See also
91:imported
73:exported
22:compiled
187:Library
116:Modern
105:library
69:Defined
46:objects
42:linking
32:Linking
244:
234:
99:linker
62:symbol
156:In a
20:is a
242:ISBN
232:ISBN
60:and
89:or
79:or
71:or
36:In
268::
240:.
230:.
164:.
97:A
40:,
16:A
248:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.