1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# CDDL HEADER START
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# The contents of this file are subject to the terms of the
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Common Development and Distribution License (the "License").
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# You may not use this file except in compliance with the License.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# or http://www.opensolaris.org/os/licensing.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# See the License for the specific language governing permissions
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# and limitations under the License.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# When distributing Covered Code, include this CDDL HEADER in each
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# If applicable, add the following below this CDDL HEADER, with the
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# fields enclosed by brackets "[]" replaced with your own identifying
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# information: Portions Copyright [yyyy] [name of copyright owner]
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# CDDL HEADER END
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# trapstat provides two families of trap tables for SPARC platforms, one for
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# sun4u, and one for sun4v. Previous implementations provided these families by
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# invoking a platform specific binary (/usr/platform/$PLATFORM/sbin/trapstat).
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# trapstat itself was linked to /usr/lib/platexec, a shell script used to
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# discover the platform name, and exec the associated platform specific binary.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# The two trapstat trap tables are now encapsulated behind a symbol capabilities
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# routine get_trap_entry(). An instance of this routine is provided for sun4u,
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# and sun4v, and are identified with a machine hardware name via using
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# ../common/mapfile-cap.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# These object capabilities relocatable objects are then translated into symbol
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# capabilities relocatable objects, pics/symcap.o.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# The sun4u and sun4v families of symbol capabilities object are eventually
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# included in the final build of trapstat.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans$(SYMCAP): $(OBJCAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans$(OBJCAP): $(OBJECTS)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Combine all pic objects into one relocatable object. Assign any capabilities
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# to this object, and define the interface.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansobjcap.o: $(OBJECTS) $(MAPFILE-CAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(OBJECTS)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Convert the combined object capabilities object into a symbol capabilities
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# object.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanssymcap.o: $(OBJCAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(LD) -r -o $@ -z symbolcap $(OBJCAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Create original object.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans%.o: ../sun4/%.c
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(COMPILE.c) -o $@ $<
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(POST_PROCESS_O)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansclean:
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(RM) $(OBJECTS)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanslint:
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinclude $(SRC)/cmd/Makefile.targ