HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 9 (of 101)
Chapter 11 Software Development
October 29, 2013
$ cc -c -v HelloWorld.c
/opt/aCC/lbin/ecom -architecture 32 -ia64abi all -ext on -lang c exception
off -sysdir /usr/include -inline_power 1 -link_type dynamic -fpeval float
-fpevaldec _Decimal32 -tls_dyn on -target_os 11.31 --sys_include /usr/include
-D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT -D__hpux -D__unix
-D__ia64=1 -D__ia64__=1 -D_BIG_ENDIAN=1 -D_ILP32 -D__HP_cc=62300
-D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG -D_INLINE_ASM
-D_FLT_EVAL_METHOD=0 -D_DEC_EVAL_METHOD=0 -ucode hdriver=optlevel%1%
-plusolistoption -Ol06all! -plusolistoption -Ol13moderate! plusooption
-Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,
pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,dn,sg,pt,kt,em,np,ar,rp,dl,fs,
,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,Qs,do,ib,pl,
,sd,ll,rl,dl,Lt,ol,fl,lm,ts,rd,dp,If!
HelloWorld.c
The verbose output shows which environment variables are used and how they are set, and which
arguments are passed to the compilation subprocesses.
On PA, /opt/langtools/lbin/cpp.ansi is the preprocessor, /opt/ansic/lbin/ccom is the
compiler.
On IA, /opt/aCC/lbin/ecom is the compiler and preprocessing is built-in.
Compiling In 64-bit Mode
Without adding special options to the compilation command, all compilers will generate 32-bit
objects. To create 64-bit objects, the compiler option +DD64 must be used.
Objects
As mentioned before, objects contain machine code and a symbol table. We can look at the
symbol table of HelloWorld.o with nm(1):
$ nm HelloWorld.o
On PA:
Symbols from HelloWorld.o:
Name Value Scope Type Subspace
C$10 | 40|static|data |$LIT$
main | 0|extern|entry |$CODE$
printf | |undef |code |
$