HP-UX Reference (11i v2 03/08) - 1 User Commands A-M (vol 1)

l
ld(1) ld(1)
chatr a.out
...
shared library list:
libfoo1.sl
Add
$ORIGIN before the shared library name in the shared library list.
ld -dynamic main.o -L /usr/lib/hpux32/ +origin -lc
ld -dynamic main.o +origin /usr/lib/hpux32/libc.so
chatr a.out
...
shared library list:
$ORIGIN/libc.so
WARNINGS
ld recognizes several names as having special meanings. The symbol
_end is reserved by the linker to
refer to the first address beyond the end of the program’s address space. Similarly, the symbol
_edata
refers to the first address beyond the initialized data, and the symbol
_etext refers to the first address
beyond the program text. The symbols
end
, edata, and etext are also defined by the linker, but only
if the program contains a reference to these symbols and does not define them (see end(3C) for details).
The linker treats a user definition of any of the symbols listed here as an error.
Through its options, the linker gives users great flexibility. However, those who invoke the linker
directly must assume some added responsibilities.
There is no guarantee that the linker will pick up files from archive libraries and include them in the
final program in the same relative order that they occur within the library.
The linker emits warnings where ever it detects any compatibility issues. Among other things, these
issues include architectural ones, as well as functionality that may change over time. Some of these
include:
Checking of unsatisfied symbols by the linker, which sometimes skips certain object files from an
archived library. This warning is only given if the
-v option is also provided.
As noted in the Options section, this release of the linker no longer supports certain options.
The linker accepts the following options and issues a warning message.
-A name
-C n
-Fw
-S
+cg pathname
+Oreusedir=dir
+OselectiveO3
+Oselectivesize
size
The following options are supported for compatibility. They are accepted and ignored:
-n
-q
-Fz
-N
-Q
-T
-V
+cdp oldpath:newpath
+gstbuckets size
+nosmartbind
+pdzero
+plabel_cache flag
+tools
+vallcompatwarnings
+v[no]compatwarnings
+O[no]fastaccess
+Ostaticprediction
Section 1446 Hewlett-Packard Company 17 HP-UX 11i Version 2: August 2003