22.12.2012 Views

z/TPF Program Management - IBM

z/TPF Program Management - IBM

z/TPF Program Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

66 z/<strong>TPF</strong> <strong>Program</strong> <strong>Management</strong><br />

v CTBX<br />

v CTXO<br />

v COMS<br />

v CPP1<br />

v CTAD<br />

v COMX<br />

v CTHD<br />

v CTDF<br />

v CJ00.<br />

For example, to call a function from a CSO named CRDT from the BILL<br />

CSO, add the following line to the makefile: LIBS := CRDT<br />

You can add additional libraries by separating the names by blanks on the<br />

same line, or by adding additional LIBS += XXXX lines.<br />

g. To call functions from an archive, the referenced archive must be listed in<br />

the calling makefile. For example, to call a function from an archive named<br />

TaxFunctions, add the following line to the makefile: ARCHIVES :=<br />

TaxFunctions<br />

You can add additional archives by separating the names by blanks on the<br />

same line, or adding additional ARCHIVES += ArchiveName lines.<br />

Note: A function that is called from a CSO is dynamically loaded at run<br />

time, but a function that is included from the archive is statically<br />

linked in the calling CSO.<br />

h. To change the assemble, compile, or link options, use flags (ASMFLAGS,<br />

CFLAGS, CXXFLAGS, or LDFLAGS) in your makefile or maketpf.cfg file.<br />

For example, when you are migrating to the z/<strong>TPF</strong> system, you might want<br />

to load programs below the 2-GB bar.<br />

v To load a single program below the 2-GB bar, add the following statement<br />

to an individual makefile: LDFLAGS_(pgm) := -Xlinker --defsym -Xlinker<br />

CGCC_31BIT=0 where pgm is the name of the makefile.<br />

v To load real-time programs below the 2-GB bar, add the following<br />

statement as an overall configuration option to the maketpf configuration<br />

file (maketpf.cfg) before building the shared object: LDFLAGS_USER :=<br />

-Xlinker --defsym -Xlinker CGCC_31BIT=0<br />

Note: All programs that are built after this flag is added are loaded below<br />

the 2-GB bar.<br />

2. Create two source segments named /home/joe/mywork/billing/rt/src/<br />

billing1.c and /home/joe/mywork/billing/rt/src/billing2.c.<br />

3. Update the user control file with a new entry for the new program:<br />

a. Create a copy of the control file in your working directory: cp<br />

/tpf/z11/local_mod/base/cntl/usr.cntl /home/joe/mywork/base/cntl/<br />

usr.cntl<br />

b. Edit the file that you just copied and add a new entry for the program named<br />

BILL. Enter the following information on one line:<br />

BILL;APP;billing/rt/src/bill.mak;1;ALL;OBJ;<strong>TPF</strong>_SBALL;LOADONLINE;NOSTUB;DEMAND;DEBUG;<br />

50;PROGRAM;NOGRP;<strong>IBM</strong>_DEFT;BPAUTH;RESTRICT;MONTC;KEY0;NOCMB;TIMESLICE;;;;;;;;;;;;;<br />

See “Control files” on page 103 for more information about the control file fields<br />

and values.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!