# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" # In order to determine which object files aren't used in building the standalone boot applications, first build the standalone libraries $ cd $SRC/stand/lib ; make install Next, collect some information from the linking process: $ cd $SRC/psm/stand/boot/`uname -p`/`uname -m` $ rm -f *.bin *boot *boot.elf $ LD_OPTIONS="-Dbindings,files,symbols" make all > /dev/null 2> ld.debug The following sort of information ends up in ld.debug (note that the debugging output from the link-editor is not considered a 'stable interface' and may change in the future): debug: debug: file=/.../proto/root_sparc/stand/lib/libcrypto.a(cryptlib.o) [ ET_REL ] debug: debug: symbol table processing; input file=/.../proto/root_sparc/stand/lib/libcrypto.a(cryptlib.o) [ ET_REL ] debug: symbol[1]=cryptlib.c ... Now run the following script #!/bin/sh - for obj in $SRC/stand/lib/crypto/objs/*.o \ $SRC/stand/lib/fs/*/objs/*.o \ $SRC/stand/lib/sa/objs/*.o \ $SRC/stand/lib/ssl/objs/*.o \ $SRC/stand/lib/wanboot/objs/*.o do f=`basename $obj` if egrep "^debug: file=.*\($f\)" ld.debug > /dev/null then : else echo $obj fi done to determine which of the .o files appears in none of the loader debug output (and therefore is unused).