Programming Tools Guide
Chapter 4, COFF link editor

Syntax diagram for input directives

Syntax diagram for input directives




NOTE: Square brackets and curly braces have two meanings in this diagram.

Where the actual symbols, [ ] and { }, are used, they are part of the syntax and must be present when the directive is specified.

Where symbols [ and ] (larger and in bold) appear, the material enclosed is optional.

Where the symbols { and } (larger and in bold) appear, multiple occurrences of the material enclosed are permitted.


 Directives        Expanded Directives
 --------------------------------------------------------------

 <ifile>           {<cmd>} 
 <cmd>             <memory>
                   <sections>
                   <assignment>
                   <filename>
                   <flags>
 <memory>          MEMORY { <memory_spec>
                   { [,] <memory_spec> } }
 <memory_spec>     <name> [ <attributes> ] :
                   <origin_spec> [,] <length_spec>
 <attributes>      ( { R | W | X | I } )
 <origin_spec>     <origin> = <long>
 <length_spec>     <length> = <long>
 <origin>          ORIGIN | o | org | origin
 <length>          LENGTH | l | len | length
 <sections>        SECTIONS  { {<sec_or_group>} }
 <sec_or_group>    <section> | <group> | <library>
 <group>           GROUP <group_options> : {
                   <section_list> } [<mem_spec>] 
 <section_list>    <section> { [,] <section> }
 <section>         <name> <sec_options> :
                   { <statement> }
                   [<fill>] [<mem_spec>] 
 <group_options>   [<addr>] | [<align_option>] [<block_option>] 
 <sec_options>     [<addr>] | [<align_option>] 
                   [<block_option>] [<type_option>] 
 <addr>            <long> | <bind>( <expr> )
 <alignoption>     <align> ( <expr> )
 <align>           ALIGN | align
 <block_option>    <block> ( <long> )
 <block>           BLOCK | block
 <type_option>     (DSECT) | (NOLOAD) | (COPY)
                   | (INFO) | (OVERLAY)
 <fill>            = <long>
 <mem_spec>        > <name>
                   > <attributes>
 <statement>       <filename>
                   <filename>  ( <name_list> ) | [COMMON]
                    ( <name_list> ) | [COMMON]
                   <assignment>
                   <library>
                   null 
 <name_list>       <section_name> [,] { <section_name> } 
 <library>         -l<name>
 <bind>            BIND | bind
 <assignment>      <lside> <assign_op> <expr> <end>
 <lside>           <name> | .
 <assign_op>       = | += | -= | = |/ =
 <end>             ; | ,
 <expr>            <expr> <binary_op> <expr>
                   <term>
 <binary_op>        | / | %
                   + | -
                   >> | <<
                   == | != | > | < | <= | >=
                   &
                   |
                   &&
                   ||
 <term>            <long>
                   <name>
                   <align> ( <term> )
                   ( <expr> )
                   <unary_op> <term>
                   <phy> (<lside>)
                   <sizeof>(<sectionname>)
                   <next>(<long>)
                   <addr>(<sectionname>)
 <unary_op>        ! | -
 <phy>             PHY | phy
 <sizeof>          SIZEOF | sizeof
 <next>            NEXT | next
 <addr>            ADDR | addr
 <flags>           -e<wht_space><name>
                   -f<wht_space><long>
                   -h<wht_space><long>
                   -l<name>
                   -m
                   -o<wht_space><filename>
                   -r
                   -s
                   -t
                   -u<wht_space><name>
                   -z
                   -H
                   -L<path_name>
                   -M
                   -N
                   -S
                   -V
                   -VS<wht_space><long>
                   -a
                   -x
 <name>            Any valid symbol name
 <long>            Any valid long integer constant
 <wht_space>       Blanks, tabs, and newlines
 <filename>        Any valid UNIX Operating System file name.
                   This may include a full or partial path
                   name.
 <sectionname>     Any valid section name, up to 8 characters
 <path_name>       Any valid UNIX Operating System path name
                   (full or partial)