Debugging a Program With dbx

Options

Linker control options directly accepted by the compilation system and linker options that may be passed through the compilation system to ild are described in this section.

Options Accepted by the Compilation System

These are linker control options accepted by the compilation system:


-i

Ignores LD_LIBRARY_PATH setting. When an LD_LIBRARY_PATH setting is in effect, this option is useful to influence the runtime library search, which interferes with the link editing being performed.


-s

Strips symbolic information from the output file. Any debugging information and associated relocation entries are removed. Except for relocatable files or shared objects, the symbol table and string table sections are also removed from the output object file.


-V

Output a message about the version of ild being used.


-B dynamic | static

Options governing library inclusion. Option -B dynamic is valid in dynamic mode only. These options can be specified any number of times on the command line as toggles: if the -B static option is given, no shared objects are accepted until -B dynamic is seen. See option -l x.


-g

The compilation systems invoke ild in place of ld when the -g option (output debugging information) is given, unless any of the following are true:

  • The -G option (produce a shared library) is given

Options Passed to ild from the Compilation System

The following options are accepted by ild, but you must use the form:

-Wl,arg,arg (for cc), or -Qoption ld arg,arg (for others),

to pass them to ild via the compilation system


-a

In static mode only, produces an executable object file; gives errors for undefined references. This is the default behavior for static mode. Option -a cannot be used with the -r option.


-m

Produces a memory map or listing of the input/output sections on the standard output.


-t

Turn off the warning about symbols that are defined more than once and that are not the same size.


-e epsym

Sets the entry point address for the output file to be that of the symbol epsym.


-I name

When building an executable, uses name as the path name of the interpreter to be written into the program header. The default in static mode is no interpreter; in dynamic mode, the default is the name of the runtime linker, /usr/lib/ld.so.1. Either case can be overridden by -I name. The exec system call loads this interpreter when it loads the a.out and passes control to the interpreter rather than to the a.out directly.


-u symname

Enters symname as an undefined symbol in the symbol table. This is useful for loading entirely from an archive library because, initially, the symbol table is empty and an unresolved reference is needed to force the loading of the first routine. The placement of this option on the command line is significant; it must be placed before the library that defines the symbol.