Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gcrt0.o(3) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gprof(1)

monitor(3C)

prof(1)

profil(2)

cc(1)

exec(2)

f77(1)

ld(1)

pc(1)

end(3C)

crt0(3)

NAME

crt0.o, gcrt0.o, mcrt0.o − execution startup routines

DESCRIPTION

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 gprof(1) and prof(1) profiling support respectively.

The following symbols are defined in these object files:

__argc_value A variable of type int containing the number of arguments. 

__argv_value An array of character pointers to the arguments themselves. 

_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_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 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. 

AUTHOR

The features described in this entry originated from AT&T UNIX System III. 

SEE ALSO

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

pc(1) invoke the HP-UX Pascal compiler

Miscellaneous:

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

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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