Print this page
9059 Simplify SMAP relocations with krtld
Portions contributed by: John Levon <john.levon@joyent.com>


 308         $(ELFEXTRACT) $(OBJS_DIR)/fb_swtch_src  >> $(OBJS_DIR)/fb_swtch.s
 309         @echo "  .align 4"                      >> $(OBJS_DIR)/fb_swtch.s
 310         @echo "  .globl fb_swtch_size"          >> $(OBJS_DIR)/fb_swtch.s
 311         @echo "fb_swtch_size:"                  >> $(OBJS_DIR)/fb_swtch.s
 312         @echo "  .long . - fb_swtch_image"      >> $(OBJS_DIR)/fb_swtch.s
 313         $(COMPILE.s) -o $@ $(OBJS_DIR)/fb_swtch.s
 314 
 315 # ridiculous contortions ---
 316 ATOMIC_SUBDIR_32        = i386
 317 ATOMIC_SUBDIR_64        = amd64
 318 ATOMIC_SUBDIR           = $(ATOMIC_SUBDIR_$(CLASS))
 319 
 320 $(OBJS_DIR)/%.o:                $(SRC)/common/atomic/$(ATOMIC_SUBDIR)/%.s
 321         $(COMPILE.s) -o $@ $<
 322 
 323 #
 324 # dtrace stubs
 325 #
 326 
 327 $(OBJS_DIR)/dtracestubs.s:      $(UNIX_O) $(LIBS)
 328         $(NM) -u $(UNIX_O) $(LIBS) | $(GREP) __dtrace_probe_ | $(SORT) | \

 329             $(UNIQ) | $(AWK) '{ \
 330             printf("\t.globl %s\n\t.type %s,@function\n%s:\n", \
 331             $$1, $$1, $$1); }' > $(OBJS_DIR)/dtracestubs.s
 332 
 333 $(DTRACESTUBS): $(DTRACESTUBS_O)
 334         $(BUILD.SO) $(DTRACESTUBS_O)


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