HP-UX Linker and Libraries User's Guide
The shl_get and shl_get_r Routines.....................................................................................175
Syntax.......................................................................................................................175
Parameters.................................................................................................................175
Return Value...............................................................................................................176
Description.................................................................................................................176
Example ...................................................................................................................176
The shl_gethandle and shl_gethandle_r Routines..................................................................177
Syntax.......................................................................................................................177
Parameters.................................................................................................................177
Return Value...............................................................................................................177
Description.................................................................................................................177
Example....................................................................................................................177
The shl_definesym Routine.................................................................................................177
Syntax.......................................................................................................................178
Parameters ................................................................................................................178
Return Value...............................................................................................................178
Description.................................................................................................................178
The shl_getsymbols Routine...............................................................................................178
Syntax ......................................................................................................................178
Parameters ................................................................................................................179
Return Value...............................................................................................................179
The shl_symbol Structure...............................................................................................180
show_symbols - Display Shared Library Symbols..............................................................180
show_all - Use show_symbols to Show All Symbols .........................................................181
The shl_unload Routine.....................................................................................................182
Syntax ......................................................................................................................182
Parameters ................................................................................................................182
Return Value ..............................................................................................................182
Description ................................................................................................................182
Usage.......................................................................................................................182
The shl_unload Routine Returning ETXTBSY.....................................................................183
Dynamic Loader Compatibility Warnings.................................................................................183
Unsupported Shared Library Management Routines..............................................................183
Unsupported Shared Library Management Flags..................................................................183
8 Writing and Generating Position-Independent Code....................................185
What is a Relocatable Object Code?......................................................................................185
What is a Absolute Object Code?..........................................................................................185
What is a Position-Independent Code?....................................................................................186
Generating Position-Independent Code....................................................................................186
PIC Requirements for Compilers and Assembly Code............................................................187
Long Calls.......................................................................................................................188
Long Branches and Switch Tables.......................................................................................188
Assigned GOTO Statements .............................................................................................188
Literal References.............................................................................................................188
Global and Static Variable References................................................................................189
Procedure Labels..............................................................................................................189
9 Using Mapfiles.......................................................................................191
Controlling Mapfiles with the -k Option....................................................................................191
Changing Mapfiles with -k filename and +nodefaultmap............................................................191
Mapfile Example: Using -k mapfile and +nodefaultmap .......................................................191
Simple Mapfile.....................................................................................................................193
Default HP-UX 11.0 Release Mapfile.........................................................................................193
Defining Syntax for Mapfile Directives.....................................................................................195
Defining Mapfile Segment Declarations...................................................................................196
10 Contents