Linker and Libraries Guide
  Procure somente este livro
Fazer download desta apostila em PDF

Index

Symbols

/usr/lib18, 55, 56, 65, 67
/usr/lib/ld.so.153

A

ABI (see Application Binary Interface andSystem V Application BinaryInterface)
Application Binary Interface4, 5, 94, 115
.....building a conformingapplication15
ar(1)12
archives14
.....inclusion of shared objects in88
.....link-editor processing12
.....multiple passes through12
.....naming conventions14
as(1)2

B

base address193
binding1
.....dependency ordering90
.....lazy60
.....to shared object dependencies86, 126
.....to version definitions126
.....to weak version definitions130

C

cc(1)1, 2, 9
COMMON21, 34, 36, 150, 166
compilation environment1, 4, 14, 84

D

data representation141
debugging aids
.....link-editing48
.....runtime linking77
dependency ordering90
dlclose(3X)66
dlerror(3X)66
dlfcn.h66
dlopen(3X)54, 66, 67 to 73, 131
.....effects of ordering72
.....modes
............RTLD_GLOBAL68, 73
............RTLD_LAZY69
............RTLD_NOW69
.....of a dynamic executable68, 73
.....shared object naming conventions85
dlsym(3X)54, 66, 73 to 76, 132
.....special handle (seeRTLD_NEXT)
dump(1)5, 55, 58, 99, 101
dynamic executables2, 3
dynamic information tags
.....NEEDED55, 86
.....RPATH56
.....SONAME87
.....TEXTREL101
dynamic linking4
.....implementation167 to 176, 199

E

ELF2, 7, 97
.....(see also object files)139
elf(3E)5
environment variables
.....LD_BIND_NOT80
.....LD_BIND_NOW60, 80, 206
.....LD_DEBUG77
.....LD_DEBUG_OUTPUT78
.....LD_LIBRARY_PATH17, 56, 65, 67, 90
.....LD_OPTIONS10, 49
.....LD_PRELOAD62, 65
.....LD_PROFILE112
.....LD_PROFILE_OUTPUT112
.....LD_RUN_PATH19
.....SGS_SUPPORT43
error messages
.....link-editor
............illegal argument to option10
............illegal option10
............incompatible options11
............multiple instances of anoption10
............multiply defined symbols27
............relocations against non-writablesections101
............shared object name conflicts88
............soname conflicts89
............symbol not assigned toversion40
............symbol warnings25, 26
............undefined symbols28
............undefined symbols from animplicit reference29
............version unavailable134
......runtime linker
............copy relocation sizedifferences110
............relocation errors61, 129
............unable to find shared object57, 68
............unable to find versiondefinition128
............unable to locate symbol75
exec(2)7, 53, 140
executable and linking format (see ELF)

F

f77(1)9
filters
......auxiliary91, 95
......standard91, 92

G

generating a shared object30
generating an executable28
generating the output file image42
global offset table42, 58, 101, 175, 213 to 215
global symbols21, 116, 163 to 165

I

initialization and termination9, 19, 64
input file processing11
interface
......private116
......public116, 249
interposition23, 24, 39, 59, 63, 76, 117
interpreter (see also runtime linker)

L

lazy binding60
ld(1)1, 2
ld.so.1 (see also runtime linker)1, 53
LD_BIND_NOT80
LD_BIND_NOW60, 80, 206
LD_DEBUG77
LD_DEBUG_OUTPUT78
LD_LIBRARY_PATH17, 56, 65, 67, 90
LD_OPTIONS10, 49
LD_PRELOAD62, 65
LD_PROFILE112
LD_PROFILE_OUTPUT112
LD_RUN_PATH19
ldd(1)5, 55, 57, 59, 61, 128, 129
libld.so.166
libraries
.....archives14
.....naming conventions14
.....shared167, 176, 199
link-editing2, 162 to 176, 199
.....adding additional libraries14
.....archive processing12
.....binding to a version definition126, 132
.....dynamic167 to 176, 199
.....input file processing11
.....library input processing11
.....library linking options11
.....mixing shared objects andarchives15
.....multiply defined symbols164 to 165
.....position of files on command line16
.....search paths16, 17
.....shared object processing13
link-editor1, 7
.....debugging aids48
.....error messages (see error messages)
.....invoking directly8
.....invoking using compiler driver9
.....overview7
.....sections7
.....segments7
.....specifying options10
link-editor options
.....-a246
......-B dynamic15
......-B reduce41
......-B static15, 246
......-D49
......-d245, 246
......-e43
......-F92
......-f92
......-G83
......-h86, 138, 247
......-i18
......-L17, 245
......-l11, 14, 56, 84, 136, 245
......-M8, 32, 33, 116, 118, 132, 227, 247, 252
......-m14, 24
......-R19, 90, 247, 248
......-r246
......-S43
......-s42
......-t25, 26
......-u32, 131
......-Y17
......-z defs30
......-z muldefs27
......-z nodefs28, 61
......-z noversion119, 128
......-z text101, 247
link-editor output
......dynamic executables2
......relocatable objects2
......shared objects2
......static executables2
link-editor support interface
......ld_atexit()44
......ld_file()45
......ld_section()45
......ld_start()44
local symbols21, 163 to 165
lorder(1)13, 50

M

mapfiles227 to 244
......defaults239
.....error messages243
.....example236
.....map structure240
.....mapping directives233
.....segment declarations229
.....size-symbol declarations236
.....structure228
.....syntax228
.....usage228
mmap(2)53
multiply defined symbols42, 163 to 165

N

naming conventions
.....archives14
.....libraries14
.....shared objects14, 84
NEEDED55, 86
nm(1)5, 98

O

object files2
.....base address193
.....data representation141
.....global offset table (see global offsettable)
.....note section187 to 188
.....preloading at runtime62
.....procedure linkage table (seeprocedure linkage table)
.....program header189 to 192
.....program interpretor204
.....program loading195
.....relocation167 to 176, 213
.....section alignment151
.....section attributes155 to 160
.....section header148 to 160
.....section names160
.....section types152 to 160
.....segment contents194 to 195
.....segment permissions193 to 194
.....segment types190 to 193
.....string table161 to 162
......symbol table162 to 167

P

paging195 to 199
performance
......allocating buffers dynamically105
......collapsing multiple definitions104
......improving locality of references106, 111
......maximizing shareability102
......minimizing data segment103
......position-independent code (seeposition-dependent code)
......relocations106, 111
......the underlying system100
......using automatic variables104
position-independent code100, 203 to 213
preloading objects (seeLD_PRELOADalso)62
procedure linkage table43, 60, 101, 175, 215, 218
profil(2)112
program interpreter53, 204 to 205
......(see also runtime linker)
pvs(1)5, 119, 122, 125, 127

R

relocatable objects2
relocation57 to 62, 106 to 111, 167 to 176
......copy107
......data references60
......function references60
......non-symbolic58, 106
......runtime linker
............symbol lookup59, 60
......symbolic58, 106
RPATH (see also runpath)56
RTLD_GLOBAL68, 73
RTLD_LAZY69
RTLD_NEXT (see also dependencyordering)73
RTLD_NOW69
runpath18, 56, 65, 67, 80, 90
runtime environment4, 14, 84
runtime linker1, 3, 53, 205
.....initialization and terminationroutines64
.....lazy binding60
.....loading additional objects62
.....programming interface (see alsodlopen(3X) family ofroutines)65
.....relocation processing57
.....search paths18, 55
.....security64
.....shared object processing54
.....version definition verification128
runtime linking3

S

SCD (see SPARC Compliance Definition)
search paths
.....link-editing16
.....runtime linker18, 55
section types
......bss7, 104, 107
......data7, 103
......dynamic42, 53, 55
......dynstr42
......dynsym42
......fini19, 64
......got42, 58
......init19, 64
......interp53
......plt43, 60, 112
......rodata103
......strtab7, 42
......symtab7, 42
......text7
sections7, 97
.....(see also section types)
security64
segments7, 97
.....data98, 100
......text98, 100
SGS_SUPPORT43
shared libraries (see shared objects)
shared objects2, 4, 54
......as filters (see filters)
......building (see also performance)83
......dependency ordering90
......explicit definition29
......implementation167 to 176, 199
......implicit definition29
......link-editor processing13
......naming conventions14, 84
......recording a runtime name86
......with dependencies89
size(1)97
SONAME87
SPARC Compliance Definition5
static executables2
strings(1)104
strip(1)42
symbol reserved names42
......_DYNAMIC42
......_edata42
......_end42
......_etext42
......_fini19
......_GLOBAL_OFFSET_TABLE_42, 215
......_init19
......_PROCEDURE_LINKAGE_TABLE_43
......_start43
......main43
symbol resolution21, 42
......complex25
......fatal26
......interposition (see interposition)
......multiple definitions13
......simple22
symbols
......absolute34, 149, 166
......archive extraction12
......auto-reduction34, 40, 118, 252
......COMMON21, 34, 36, 150, 166
......defined21
......definition12, 27
.....existance test30
.....global21, 23, 116, 163 to 165
.....local21, 163 to 165
.....private interface116
.....public interface116
.....reference12, 27
.....runtime lookup69 to 77
............deferred60
.....scope69 to 73
.....tentative12, 21, 31, 34, 36, 150
............ordering in the output file31
............realignment36
.....undefined12, 21, 27, 28, 30
.....version definitions130
.....weak12, 23, 30, 164
System V Application BinaryInterface250

T

tentative symbols12, 21, 34, 36
TEXTREL101
tsort(1)13, 50

U

undefined symbols27

V

versioning115
.....base version definition119
.....binding to a definition126, 132
.....defining a public interface40, 118
.....definitions116, 117, 126
.....external filename117, 253
.....generating definitions within animage33, 40, 117
.....internal definitions117
.....normalization127
.....overview115
.....runtime verification128, 131
.....sections160
.....symbol definitions130
virtual addressing195

W

weak symbols23, 163 to 165
......undefined30