2 Determining How to Link Programs or Libraries (Linker Tasks)
You have a great deal of control over how the linker links your program or library by using ld
•“Using the Compiler to Link” (page 28)
◦“Changing the Default Library Search Path with
◦“Getting Verbose Output with
◦“Passing Linker Options from the Compiler Command with
◦“Renaming the Output File with
◦“Specifying Libraries with
◦“Suppressing the
•“Using Linker Commands” (page 30)
◦“Linking with the crt0.o Startup File” (page 30)
◦“Changing the Default Library Search Path with
◦“Changing the Default Shared Library Binding with
◦“Improving Shared Library Performance with
◦“Choosing Archive or Shared Libraries with
◦“Linking Shared Libraries with
◦“Linking Archived Libraries with
◦“Exporting Symbols with +e” (page 37)
◦“Exporting Symbols with +ee” (page 38)
◦“Exporting Symbols from main with
◦“Hiding Symbols from Export with +hideallsymbols” (page 39)
◦“Hiding Symbols with
◦“ Not Recording Link Time Paths with +nodefaultrapth” (page 41)
◦“Moving Libraries after Linking with +b” (page 41)
◦“Moving Libraries After Linking with +s and SHLIB_PATH” (page 43)
◦“Ignoring Dynamic Path Environment Variables with +noenvvar” (page 43)
◦“Controlling Archive Library Loading with +[no]forceload” (page 44)
27