Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ a.out(4) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                 a.out(4)



        _________________________________________________________________
        a.out                                                 File Format
        link editor output in DG/UX
        _________________________________________________________________


        DESCRIPTION

        The file name a.out is the output file from the link editor
        ld(1).  The format of this executable object file is:

                            ________________________
                                  file header
                            ________________________
                                 system header
                            ________________________
                                      ...
                            ________________________
                             unshared code and data
                            ________________________
                                      ...
                            ________________________
                              shared code and data
                            ________________________
                                 (symbol table)
                            ________________________
                            (debugger symbols data)
                            ________________________
                             (debugger lines data)
                            ________________________
                               (lines title data)
                            ________________________
                            (relocation information)
                            ________________________


        Notes:  The entries enclosed in parentheses in the table above
        may or may not be present in a particular a.out file.

        In the unshared code and data section, the starting file address
        is block-aligned. In the shared code and data section, the file
        and logical addresses are page-aligned, and the length is page-
        padded. Symbol table entries are word-aligned; if a symbol name
        is an odd number of characters in length, a byte (not necessarily
        null) is appended to the name field.

        The ordering of the above sections represents the current status
        of executable files, and is subject to change. Users should
        expect only that the file header will appear first. All other
        sections can be found using information contained in the file
        header.



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                 a.out(4)



           File Header

        This is the format of a file header within an a.out file:


                 _______________________________________________
                 magic number
                 _______________________________________________
                 format revision number
                 _______________________________________________
                 number of non-executable sections
                 _______________________________________________
                 number of executable sections
                 _______________________________________________
                 section descriptor for system header
                 _______________________________________________
                 section descriptor for symbol table
                 _______________________________________________
                 section descriptor for debugger symbols data
                 _______________________________________________
                 section descriptor for debugger lines data
                 _______________________________________________
                 section descriptor for lines title data
                 _______________________________________________
                 section descriptors for two executable sections
                 _______________________________________________



           Section Descriptor

        This is the format of a section descriptor within an a.out file:

                  _____________________________________________
                  logical word address of start of section    0
                                                              1
                  _____________________________________________
                  logical word length of section              2
                                                              3
                  _____________________________________________
                  file byte address of start of section       4
                                                              5
                  _____________________________________________
                  file byte length of section                 6
                                                              7
                  _____________________________________________
                  file byte address of start of relocation   10
                                                             11
                  _____________________________________________
                  file byte length of relocation             12
                                                             13



        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)





                                                                 a.out(4)



                  _____________________________________________
                  section attributes                         14
                                                             15
                  _____________________________________________


        Notes:  The section descriptors for the system header, the
        debugger symbols, the debugger lines, and the lines title
        sections have no logical addresses or lengths. The total number
        of symbols in the symbol table is kept in the ``logical length''
        field of the symbol table section descriptor.


           System Header

                          ____________________________
                          execution start address    0
                                                     1
                          ____________________________
                          stack size                 2
                                                     3
                          ____________________________
                          unlabelled common size     4
                                                     5
                          ____________________________
                          date/time                  6
                                                     7
                          ____________________________
                          user revision number      10
                                                    11
                          ____________________________
                          flags                     12
                          ____________________________
                          number of tasks           13
                          ____________________________
                          number of channels        14
                          ____________________________

















        DG/UX 4.00                                                 Page 3
               Licensed material--property of copyright holder(s)





                                                                 a.out(4)






           Partition-type Symbol in the Symbol Table

        This is the format for a partition-type symbol:

                ________________________________________________
                type                                           0
                ________________________________________________
                byte size of value field (8)                   1
                ________________________________________________
                word address of partition                      2
                                                               3
                ________________________________________________
                word length of partition                       4
                                                               5
                ________________________________________________
                byte length of name                            6
                ________________________________________________
                name first character   name second character   7
                ________________________________________________
                                       ...
                ________________________________________________



           Other Symbol Types in the Symbol Table:

        All other symbol types in the symbol table have this format:


                ________________________________________________
                type                                           0
                ________________________________________________
                byte size of value field (4)                   1
                ________________________________________________
                value of symbol                                2
                                                               3
                ________________________________________________
                byte length of name                            4
                ________________________________________________
                name first character   name second character   5
                ________________________________________________
                        ...
                ________________________________________________



        Note:  The symbol types are the same as an AOS/VS .ST file:




        DG/UX 4.00                                                 Page 4
               Licensed material--property of copyright holder(s)





                                                                 a.out(4)



        0=ENTRY 1=EXT 2=COMM 3=ASYM 4=ENTO 5=TITLE 6=PENT 7=EXTS 8=LOCAL
        9=EXTC 10=LIMIT 11=BSLPENT 12=SLPENT 13=PART 14=SOENTO 15=ENTS



           Structures

        These are the relevant declarations:

        struct nsection
         { unsigned int logical_start;
           unsigned int logical_length;
           unsigned int file_start;
           unsigned int file_length;
           unsigned int file_reloc;
           unsigned int file_reloc_length;
           unsigned int attributes;
         };

        struct prformat
         { unsigned short magic_number;       /*  magic                 */
           unsigned short format_rev_num;   /*  format rev. number      */
           unsigned short num_non_exec_sect;  /*  # of non-exec.  sects */
           unsigned short num_exec_sect;      /*  # of executable sects */
           struct nsection syshead;        /*  system header            */
           struct nsection symbolt;        /*  symbol table             */
           struct nsection ds;             /*                           */
           struct nsection dl;             /*                           */
           struct nsection lt;             /*                           */
           struct nsection exec[2];        /*  two executable sections  */
         };

        struct system_header
        {  unsigned int    start_pc;          /* starting pc        */
           unsigned int    stacks;            /* stack size         */
           unsigned int    unlabeled;         /* size of heap       */
           unsigned int    time_stamp;        /* time stamp         */
           unsigned int    user_rev_number;   /* user rev. num.     */
           unsigned short  flags;             /* flags              */
           unsigned short  ntasks;            /* number of tasks    */
           unsigned short  nchannels;         /* number of channels */
         };



        FILES

        /usr/include/filehdr.h






        DG/UX 4.00                                                 Page 5
               Licensed material--property of copyright holder(s)





                                                                 a.out(4)



        SEE ALSO

        brk(2).
        ld(1) in the User's Reference for the DG/UX System


















































        DG/UX 4.00                                                 Page 6
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026