pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
NOTE: These linker options discard information that SYMBOLS saves:
• -x discards line number information.
• -s discards information needed for future linking (use it only in building an executable file).
Usually you save symbols for the entire compilation by specifying SYMBOLS once at the beginning
of the compilation unit. The symbol table then contains all the symbols generated by the source
code.
Example 362 SYMBOLS Directive
! MYSOURCE file
?SYMBOLS ! Save symbols for compilation unit
! Declare global data
! Declare procedures
After debugging the program, you can use the linker to create a new, smaller object file without
symbols. The executable portion of the old object file remains intact, but you dramatically reduce
what you can do with a symbolic debugger.
nld -x -r oldobj -o newobj
ld -x -r oldobj -o newobj
eld -x -r oldobj -o newobj
Use the linker option -s when linking a loadfile, or use the strip utility after creating the loadfile.
STRIP oldobj
SYNTAX
SYNTAX checks the syntax of the source text without producing an object file.
The compiler produces an object fileDefault:
AnywherePlacement:
Applies to the compilation unitScope:
Interacts with SAVEGLOBALS and USEGLOBALS (see Saving Global Data
Declarations (page 373))
Dependencies:
References:
• SAVEGLOBALS (page 413)
• USEGLOBALS (page 423)
The compilation command in Example 363 (page 422) checks the syntax of global data declarations
in source file myprog and saves the declarations in file ptalsym for use in subsequent compilations.
Example 363 SYNTAX Directive
pTAL /IN myprog/; SAVEGLOBALS ptalsym, SYNTAX
The compilation command in Example 364 (page 423) checks for the syntax of the code or data
in source file myprog. In this compilation, USEGLOBALS retrieves global data declarations saved
in the compilation shown in Example 363 (page 422).
422 Compiler Directives