01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

SHLill ( 4) (AT&T UNIX PC only ) SHLill ( 4)<br />

NAME<br />

shlib - shared library<br />

DESCRIPTION<br />

UNIX PC UNIX supports a shared library. Its use results in<br />

significantly smaller programs, reduced startup times, and better<br />

runtime performance. This is accomplished by loading the library<br />

with the first program that invokes it. The library is then shared<br />

with subsequent programs. Once loaded, the library remains in<br />

place until the system is reset.<br />

The shared library contains all the routines traditionally loaded by<br />

-lc, -ltam, and -ltermlib .<br />

Use of the shared library requires a change to the makefiles.<br />

Source code remains unchanged. The typical makefile link-load<br />

line is<br />

FILES<br />

or<br />

$(LD) $(LDFLAGS) -o target objects -lc -!tam -ltermlib<br />

$(CC) $(LDFLAGS) -o target objects -!tam -ltermlib<br />

should be replaced with<br />

$(LD) $(LDFLAGS) $(SHAREDLIB) -o target objects<br />

where target is the executable and objects are the files with the .o<br />

suffixes. $(SHAREDLIB) is defined in $(MA.KEINC)/Makepre.h.<br />

/lib/shlib<br />

/lib /shlib.ifile<br />

/lib/crtos.o<br />

SEE ALSO<br />

cc(l), ld(l).<br />

BUGS<br />

Programs that redefine symbols in the shared library cannot use it<br />

and must rename the conflicting symbols.<br />

A shared library subroutine cannot contain a breakpoint.<br />

- 1 -

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

Saved successfully!

Ooh no, something went wrong!