crt0_pa.3 (2010 09)

c
crt0_pa(3)
PA-RISC Systems Only
crt0_pa(3)
NAME
crt0_pa: crt0.o, gcrt0.o, mcrt0.o - execution startup routines for PA-RISC systems
SYNOPSIS
Remarks
PA-RISC 64-bit ELF uses
crt0.o only.
This manpage describes
crt0.o on PA-RISC systems. For
crt0.o on Integrity systems, see crt0_ia (3).
DESCRIPTION
PA-RISC 32-bit SOM
The C, Pascal, and FORTRAN compilers link in the object files
crt0.o, gcrt0.o,or mcrt0.o to pro-
vide 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:
_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 vari-
able is initialized with data from the kernel.
_SYSTEM_ID A variable of type int containing the system id value for an executable pro-
gram.
$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 com-
pilers.
$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.
PA-RISC 64-bit ELF
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 func-
tionality 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 rou-
tines 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
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)