The lorder command overlooks object files whose names do not end with .o, even when contained in library archives, and attributes their global symbols and references to some other file.

Example 15 Finding Object Library Ordering Relationships with lorder(1)

Build a new library from existing .o files:

$ ar cr library `lorder *.o tsort`

When creating libraries with so many objects that the shell cannot properly handle the *.o expansion, the following method may prove useful:

$ ls grep '.o$'lordertsortxargs ar cq library

78 Linker Tools for PA-RISC Systems

Page 78
Image 78
HP UX Software Transition Kit (STK) manual $ ar cr library `lorder *.o tsort`