Print this page
10908 Simplify SMAP relocations with krtld


   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
  25 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.

  26 #
  27 
  28 #       This Makefile defines the build rules for the directory uts/i86pc
  29 #       and its children. These are the source files which are i86pc
  30 #       "implementation architecture" dependent.
  31 #
  32 #       The following two-level ordering must be maintained in this file.
  33 #         Lines are sorted first in order of decreasing specificity based on
  34 #         the first directory component.  That is, i86pc rules come before
  35 #         intel rules come before common rules.
  36 #
  37 #         Lines whose initial directory components are equal are sorted
  38 #         alphabetically by the remaining components.
  39 
  40 #
  41 #       Section 1a: C object build rules
  42 #
  43 $(OBJS_DIR)/%.o:                $(UTSBASE)/i86pc/conf/%.c
  44         $(COMPILE.c) -o $@ $<
  45         $(CTFCONVERT_O)


 298         $(ELFEXTRACT) $(OBJS_DIR)/fb_swtch_src  >> $(OBJS_DIR)/fb_swtch.s
 299         @echo "  .align 4"                      >> $(OBJS_DIR)/fb_swtch.s
 300         @echo "  .globl fb_swtch_size"          >> $(OBJS_DIR)/fb_swtch.s
 301         @echo "fb_swtch_size:"                  >> $(OBJS_DIR)/fb_swtch.s
 302         @echo "  .long . - fb_swtch_image"      >> $(OBJS_DIR)/fb_swtch.s
 303         $(COMPILE.s) -o $@ $(OBJS_DIR)/fb_swtch.s
 304 
 305 # ridiculous contortions ---
 306 ATOMIC_SUBDIR_32        = i386
 307 ATOMIC_SUBDIR_64        = amd64
 308 ATOMIC_SUBDIR           = $(ATOMIC_SUBDIR_$(CLASS))
 309 
 310 $(OBJS_DIR)/%.o:                $(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
 311         $(COMPILE.s) -o $@ $<
 312 
 313 #
 314 # dtrace stubs
 315 #
 316 
 317 $(OBJS_DIR)/dtracestubs.s:      $(UNIX_O) $(LIBS)
 318         $(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \

 319             $(UNIQ) | $(AWK) '{ \
 320             printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
 321             $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
 322 
 323 $(DTRACESTUBS): $(DTRACESTUBS_O)
 324         $(BUILD.SO) $(DTRACESTUBS_O)


   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 
  22 #
  23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  24 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
  25 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  26 # Copyright (c) 2017 Joyent, Inc.
  27 #
  28 
  29 #       This Makefile defines the build rules for the directory uts/i86pc
  30 #       and its children. These are the source files which are i86pc
  31 #       "implementation architecture" dependent.
  32 #
  33 #       The following two-level ordering must be maintained in this file.
  34 #         Lines are sorted first in order of decreasing specificity based on
  35 #         the first directory component.  That is, i86pc rules come before
  36 #         intel rules come before common rules.
  37 #
  38 #         Lines whose initial directory components are equal are sorted
  39 #         alphabetically by the remaining components.
  40 
  41 #
  42 #       Section 1a: C object build rules
  43 #
  44 $(OBJS_DIR)/%.o:                $(UTSBASE)/i86pc/conf/%.c
  45         $(COMPILE.c) -o $@ $<
  46         $(CTFCONVERT_O)


 299         $(ELFEXTRACT) $(OBJS_DIR)/fb_swtch_src  >> $(OBJS_DIR)/fb_swtch.s
 300         @echo "  .align 4"                      >> $(OBJS_DIR)/fb_swtch.s
 301         @echo "  .globl fb_swtch_size"          >> $(OBJS_DIR)/fb_swtch.s
 302         @echo "fb_swtch_size:"                  >> $(OBJS_DIR)/fb_swtch.s
 303         @echo "  .long . - fb_swtch_image"      >> $(OBJS_DIR)/fb_swtch.s
 304         $(COMPILE.s) -o $@ $(OBJS_DIR)/fb_swtch.s
 305 
 306 # ridiculous contortions ---
 307 ATOMIC_SUBDIR_32        = i386
 308 ATOMIC_SUBDIR_64        = amd64
 309 ATOMIC_SUBDIR           = $(ATOMIC_SUBDIR_$(CLASS))
 310 
 311 $(OBJS_DIR)/%.o:                $(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
 312         $(COMPILE.s) -o $@ $<
 313 
 314 #
 315 # dtrace stubs
 316 #
 317 
 318 $(OBJS_DIR)/dtracestubs.s:      $(UNIX_O) $(LIBS)
 319         $(NM) -u $(UNIX_O) $(LIBS) | \
 320         $(EGREP) '(__dtrace_probe_|smap_(disable|enable))' | $(SORT) | \
 321             $(UNIQ) | $(AWK) '{ \
 322             printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
 323             $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
 324 
 325 $(DTRACESTUBS): $(DTRACESTUBS_O)
 326         $(BUILD.SO) $(DTRACESTUBS_O)