*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> mcrt0.o (3)              
Title
Content
Arch
Section
 

f(1)

Contents


 crt0_pa(3)                                                       crt0_pa(3)
                             For PA-RISC Systems



 NAME    [Toc]    [Back]
      crt0_pa: crt0.o, gcrt0.o, mcrt0.o - execution startup routines; PARISC
 64-bit ELF uses crt0.o only

 DESCRIPTION    [Toc]    [Back]
    PA-RISC 32-bit SOM
      The C, Pascal, and FORTRAN compilers link in the object files crt0.o,
      gcrt0.o, or mcrt0.o to provide startup capabilities and environments
      for program execution.  All are identical except that gcrt0.o and
      mcrt0.o provide additional functionality for gpro
      profiling support respectively.

      The following symbols are defined in these object files:

           _environ            An array of character pointers to the
                               environment in which the program will run.
                               This array is terminated by a null pointer.

           _FPU_MODEL          A variable of type short containing the FPU
                               model number returned by the FP status
                               instruction.  This variable is initialized
                               with data from the kernel.

           _FPU_REVISION       A variable of type short containing the FPU
                               revision number returned by the FP status
                               instruction.  This variable is initialized
                               with data from the kernel.

           _CPU_KEYBITS_1      A variable of type int containing CPU
                               specific information.  This variable is
                               initialized with data from the kernel.

           _CPU_REVISION       A variable of type int containing the CPU
                               revision of the machine.  This variable is
                               initialized with data from the kernel.

           _SYSTEM_ID          A variable of type int containing the system
                               id value for an executable program.

           $START$             Execution start address.

           _start              A secondary startup routine for C programs,
                               called from $START$, which in turn calls
                               main.  This routine is contained in the C
                               library rather than the crt0.o file.  For
                               Pascal and FORTRAN programs, this symbol
                               labels the beginning of the outer block (main
                               program) and is generated by the compilers.

           $global$            The initial address of the program's data
                               pointer.  The startup code loads this address



 Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Sep 2004






 crt0_pa(3)                                                       crt0_pa(3)
                             For PA-RISC Systems



                               into general register 27.

           $UNWIND_START       The beginning of the stack unwind table.

           $UNWIND_END         The end of the stack unwind table.

           $RECOVER_START      The beginning of the try/recover table.

           $RECOVER_END        The end of the try/recover table.

      The crt0.o file defines a null procedure for _mcount, so programs
      compiled with profiling can be linked without profiling.

      The linker defines the following two symbols:

           __text_start        The beginning address of the program's text
                               area.
           __data_start        The beginning address of the program's data
                               area.

    PA-RISC 64-bit ELF    [Toc]    [Back]
      The C, Pascal, and FORTRAN compilers link in the object file crt0.o to
      provide startup capabilities and environments for program execution.
      It contains startup code that must be linked using ld to every -
      noshared PA-RISC 64-bit program.  In a -dynamic program, the crt0.o
      object file is not used, and all actions normally associated with it
      are instead done by the dynamic loader dld.sl(5).  Additional
      functionality for prof(1) and gprof(1) profiling support is no longer
      handled by crt0.o.

      In a PA-RISC 64-bit environment, crt0.o processes initializers and
      terminators.  Initializers are routines that are called before the
      program entry point and terminators are routines that are called when
      the program terminates via the exit routine.  Initializers are invoked
      in reverse order of the link line so that dependent libraries are
      initialized before the libraries that depend on them.  Terminators, on
      the other hand, are invoked in the forward order.

      Unlike the SOM version of crt0.o, crt0.o for PA-RISC 64-bit ELF does
      not define any variables.  It, however, sets the following global
      variables:

           __argc              A variable of type long containing the number
                               of arguments.

           __argv              An array of character pointers to the
                               arguments themselves.

           _environ, __envp    An array of character pointers to the
                               environment in which the program will run.
                               This array is terminated by a null pointer.



 Hewlett-Packard Company            - 2 -      HP-UX 11i Version 2: Sep 2004






 crt0_pa(3)                                                       crt0_pa(3)
                             For PA-RISC Systems



           _CPU_KEYBITS_1      A variable of type int containing CPU
                               specific information.  This variable is
                               initialized with data from the kernel.

           _FPU_MODEL          A variable of type long containing the FPU
                               model number returned by the FP status
                               instruction.  This variable is initialized
                               with data from the kernel.

           _FPU_REVISION       A variable of type long containing the FPU
                               revision number returned by the FP status
                               instruction.  This variable is initialized
                               with data from the kernel.

           _CPU_REVISION       A variable of type long containing the CPU
                               revision of the machine.  This variable is
                               initialized with data from the kernel.

           _SYSTEM_ID          A variable of type long containing the system
                               id value for an executable program.

           __tls_size          A variable of type long containing the
                               requested thread local storage size.  This
                               variable is initialized with data from the
                               kernel.

           __load_info         A variable of type void * containing load
                               information passed from the kernel.

 AUTHOR    [Toc]    [Back]
      The features described in this entry originated from AT&T UNIX System
      III.

 FILES    [Toc]    [Back]
      crt0.h

 SEE ALSO    [Toc]    [Back]
    Profiling and Debugging Tools
      gprof(1)          display call graph profile data
      monitor(3C)       prepare execution profile
      prof(1)           display profile data
      profil(2)         execution time profile
    System Tools
      cc(1)             invoke the HP-UX C compiler
      exec(2)           execute a file
      f77(1)            invoke the HP-UX FORTRAN compiler
      ld(1)             invoke the link editor
      dld.sl(5)         the PA-RISC dynamic loader
      pc(1)             invoke the HP-UX Pascal compiler
    Miscellaneous




 Hewlett-Packard Company            - 3 -      HP-UX 11i Version 2: Sep 2004






 crt0_pa(3)                                                       crt0_pa(3)
                             For PA-RISC Systems



      end(3C)           symbol of the last locations in program


 Hewlett-Packard Company            - 4 -      HP-UX 11i Version 2: Sep 2004
[ Back ]
      
      
 Similar pages
Name OS Title
crt0_ia HP-UX execution startup routines
crt0.o HP-UX execution startup routines
crt0.o_ia HP-UX execution startup routines
crt0 HP-UX execution startup routines
dostartuphooks OpenBSD run all startup hooks
rc.sendmail FreeBSD sendmail(8) startup script
startuphook_disestablish OpenBSD add or remove a startup hook
toggleSystemTunes IRIX set speaker volume during startup
startuphook_establish OpenBSD add or remove a startup hook
rc OpenBSD command scripts for system startup
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service