AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

LD ( 1 ) LD (1) -5 Strip line number entries and symbol table information from the output object file. -t Turn off the warning about multiply-defined symbols that are not the same size. -u symname Enter symname as an undefined symbol in the symbol table. This is useful for loading entirely from a library, since initially the symbol table is empty and an unresolved reference is needed to force the loading of the first routine. � -x Do not preserve local (non-.global) symbols in the output symbol table; only enter external and static symbols. This option saves some space in the output file. -Z Do not bind anything to address zero. This option will allow runtime detection of null pointers. -L dir Change the algorithm of searching for libx .a to look in dir before looking in /lib. -M Output a message for each multiply-defined external definition. However, if the objects being loaded include debugging information, extraneous output is produced (see the -g option in cc(1)). -N Put the data section immediately following the text in the output file. The result is a plain executable file, indicated by magic number 0407 in the operating system header. -n Put the data section at the next segment boundary following the text section. The result is a shared text file, indicated by magic number 0410 in the operating system header. -z Like -n but permits demand paged execution. This type of file is indicated by magic number 0413 in the operating system header. -F Like -z but takes less disk space and can page faster into memory. This type is also indicated by magic number 0413 in the operating system header. It is distinguished by having virtual text and data starting addresses that are equal to the file offsets of the text and data sections, modulo 4096. The -F option is on by default. -V Output a message giving information about the version of ld being used. -VS num Use num as a decimal version number identifying the a.out file that is produced. The version stamp is stored in the optional header. -G Change the symbol name look-up algorithm as follows: if two names do not initially match, then if one of them is exactly eight characters, then a match is attempted only on the first eight characters. The purpose of this is to - 2-

LD ( 1 ) FILES LD ( 1) allow compatibility between object modules that have been created with the old C compiler and with the new C compiler, which allows variable names more than eight characters long. A warning message is issued in such cases. -w If -G is used, do not print warnings about symbols that partially matched. /lib/libx.a jusr/lib/libx.a a. out /lib/ifile.0407 /lib/ifile.0410 /lib/ifile.0413 /lib/ifile.0413-F libraries libraries output file default -N directive file default -n directive file default -z directive file default -F directive file SEE ALSO as(l), cc(l), a.out(4), ar(4), exit(2), end(3C) CAVEATS Through its options and input directives, the common link editor gives users great flexibility; however, people who use the input directives must assume some added responsibilities. Input directives should insure the following properties for programs: C defines a zero pointer as null. A pointer to which zero has been assigned must not point to any object. To satisfy this, users must not place any object at virtual address zero in the data space. - 3-

LD ( 1 )<br />

LD (1)<br />

-5 Strip line number entries and symbol table information<br />

from the output object file.<br />

-t Turn off the warning about multiply-defined symbols that<br />

are not the same size.<br />

-u symname<br />

Enter symname as an undefined symbol in the symbol<br />

table. This is useful for loading entirely from a library,<br />

since initially the symbol table is empty and an<br />

unresolved reference is needed to force the loading of the<br />

first routine.<br />

�<br />

-x Do not preserve local (non-.global) symbols in the output<br />

symbol table; only enter external and static symbols.<br />

This option saves some space in the output file.<br />

-Z Do not bind anything to address zero. This option will<br />

allow runtime detection of null pointers.<br />

-L dir Change the algorithm of searching for libx .a to look in<br />

dir before looking in /lib.<br />

-M Output a message for each multiply-defined external<br />

definition. However, if the objects being loaded include<br />

debugging information, extraneous output is produced (see<br />

the -g option in cc(1)).<br />

-N Put the data section immediately following the text in the<br />

output file. The result is a plain executable file, indicated<br />

by magic number 0407 in the operating system header.<br />

-n Put the data section at the next segment boundary following<br />

the text section. The result is a shared text file, indicated<br />

by magic number 0410 in the operating system<br />

header.<br />

-z Like -n but permits demand paged execution. This type<br />

of file is indicated by magic number 0413 in the operating<br />

system header.<br />

-F Like -z but takes less disk space and can page faster into<br />

memory. This type is also indicated by magic number<br />

0413 in the operating system header. It is distinguished<br />

by having virtual text and data starting addresses that<br />

are equal to the file offsets of the text and data sections,<br />

modulo 4096. The -F option is on by default.<br />

-V Output a message giving information about the version of<br />

ld being used.<br />

-VS num<br />

Use num as a decimal version number identifying the<br />

a.out file that is produced. The version stamp is stored<br />

in the optional header.<br />

-G Change the symbol name look-up algorithm as follows: if<br />

two names do not initially match, then if one of them is<br />

exactly eight characters, then a match is attempted only<br />

on the first eight characters. The purpose of this is to<br />

- 2-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!