collide(1)

collide - Look for name collisions between libraries

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.

NAME
     collide - Look for name collisions between libraries

SYNOPSIS
     collide [-l] [-d] [-w] file  ...

DESCRIPTION
     When porting a large application, a critical question is ``How do I
     know if names in this application conflict with names in libraries I
     must use?''  collide answers that question by finding name collisions
     across archive libraries and object files.  It treats a Dynamic Shared
     Object (DSO) as if it were an archive library.

     Given a list of files, collide finds all duplicate external names and
     writes those names to standard output.  There is no output if there
     are no conflicts.

     The following options are available:

     -l          This option adds the object file names to the output.
                 This must be the first option to collide if it is
                 specified at all.

     -d          This option reports duplicate external names on standard
                 error.  This reports the same problems ar would if run on
                 the same object files but in more detail.  -d applies to
                 object files, not archive libraries.

     -w          This option treats weak symbols the same as normal
                 external symbols.  By default, weak symbols are ignored in
                 the search for duplicates.

     files       The named files may be either archive libraries or object
                 files.  A list of object files is gathered together (by
                 /usr/lib/collide1) just as is done by ar(1).  Gathering of
                 a list of objects stops when an archive name is seen.
                 Object gathering is important because a common declaration
                 may appear in multiple files yet it does not reflect a
                 name duplication.

     collide is a shell script that uses /usr/lib/collide1 to extract the
     public symbols from each archive (or gathered collection of objects)
     and notes the object file name and archive name along with the symbol.
     You may find it useful to find which library or object contains a
     name, (the name may be a weak symbol).  For example, the following do
     roughly the same thing:

          /usr/lib/collide1 -w /usr/lib/libc.a | grep strcpy
          nm -Bo /usr/lib/libc.a | grep strcpy

     If there are too many objects to list them all on the command line,
     use the ar(1) command to build an archive.

NOTES
     The format of a line written by collide1 is:

          variable-name objectfile-name archive-name

     Each name is separated by a tab; the line ends with a newline.  There
     are no blanks or extraneous characters in the output.

     If you supply object names to collide, specify the -d option.

     While the C language does not have FORTRAN common declarations per se,
     the declaration int c; will, if it appears outside of any function
     declaration be marked in the symbol table as common (with Traditional
     C only, not with ANSI C).

     common declarations that appear in different archives can cause false
     reports of duplications.  This should not happen if you put all your
     objects in a single archive or list all your objects together on the
     command line.

     collide recognizes an object as a DSO by looking for names ending in
     .so or .so.n, (where n is a number, as in .so.1) so a DSO that is not
     named that way is treated as a simple object file.

EXAMPLES
          cd /usr/lib
          collide libgl_s.a libc.a libcps.a /tmp/mylib.a
          cd /usr/tmp
          # a.o b.o treated as if in archive "none".
          # c.o d.o treated as if in a separate archive "none".
          collide -d a.o b.o /usr/lib/libc.a c.o d.o

          ar cr mylib.a *.o
          collide  mylib.a /usr/lib/libc.a

          # Not useful. All the externals are collisions.
          collide libc_s.a libc.a

FILES
     /usr/sbin/collide
     /usr/lib/collide1