102.3 Manage Shared Libraries (Overview) Flashcards

1
Q

Shared Libraries

reusable functions that other apps use by ‘linking’ to them within the library file

A

shared libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Shared Libraries

shared libraries have the file extension

A

.so
shared object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Shared Libraries

/lib
/usr/lib*
/usr/local/lib/*
/usr/share/*

A

common locations for shared libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Shared Libraries

specific library versions linked to more generic name

A

soft links

ie: libstdc++.so > libstdc++.so>6.).19

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Shared libraries : Linking

app contains full copy of library used

A

static linking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shared libraries : Linking

Advantage of static linking

A

version control
app has exact library version it expects with known interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Shared libraries : Linking

Disadvantage of static linking

A

size
increases the size of the app since it includes full copy of any statically linked library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Shared libraries : Linking

Disadvantage of static linking

A

upgrades
app needs to be recompiled and relinked anytime the library required is updated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Shared libraries : Linking

app uses the library externally using ‘______” library that is installed on the OS itself but not the app

A

‘stubs’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Shared libraries : Linking

Advantage of dynamic linking

A

size
app is smaller because the libs are separate from it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Shared libraries : Linking

Advantage of dynamic linking

A

upgrades
no recompile or relinking needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Shared Libraries: Linking

any time an app needs to use a shared library this service is called

A

ld.so
aka dynamic linker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Shared Libraries: Linking

shows a list of all libs the indicated dynamic executable app requries

A

ldd [filename]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Shared Libraries: Linking

configures dynamic linker run-time bindings (creates links / caches most recent)

A

ldconfig

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Shared Libraries: linking

ldconfig

looks as specified on command line
looks as specified in the
commonly run after system updates or after 3rd party app installs

A

ls.so.conf file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Shared Libraries: linking

ldconfig

generates ‘______” file that is a binary listing libs on system as detected

A

/etc/ld.so.cache

17
Q

Shared Libraries: linking

standard list of lib file locations listed here

A

/etc/ld.so.conf

18
Q

Shared Libraries: linking

if a line exists in the /include ld.so.conf.d/*.conf it will read all files looking for

A

libraries

19
Q

Shared Libraries: linking

any env var can be user-specific or system wide that specifies a path

A

LD_LIBRARY_PATH

20
Q

Shared Libraries: linking

typical format of LD_LIBRARY_PATH so that ld.so and ldconfig app(s) can look for libs

A

colon(:) delimited