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