]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "dtrace: support SDT in single-file modules"
authorChuck Anderson <chuck.anderson@oracle.com>
Sat, 28 May 2016 12:27:01 +0000 (05:27 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 28 May 2016 12:27:01 +0000 (05:27 -0700)
This reverts commit daf016df43a40608ca00906c9c42bcbdb48712e3.

Orabug: 23344927
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
scripts/Makefile.build
scripts/Makefile.modpost
scripts/mod/modpost.c

index 01df30af4d4a50f7ffec08993115b2e412128d1f..63645acf5d7ab93e8ece77a5c54d565423f082f9 100644 (file)
@@ -380,9 +380,38 @@ $($(subst $(obj)/,,$(@:.o=-y)))), $^)
 quiet_cmd_link_multi-y = LD      $@
 cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis)
 
+ifdef CONFIG_DTRACE
+
+# We need secondary expansion for the %.sdtstub.S creation rule
+.SECONDEXPANSION:
+
+sdtgen = $(srctree)/scripts/dtrace_sdt.sh
+
+quiet_cmd_sdtstub = SDTSTB  $@
+      cmd_sdtstub = $(sdtgen) sdtstub $@ \
+                             $(filter $(addprefix $(obj)/, \
+                               $($(subst $(obj)/,,$(@:.sdtstub.S=-objs))) \
+                               $($(subst $(obj)/,,$(@:.sdtstub.S=-y)))), \
+                               $(subst |,,$(multi-objs-m)))
+
+$(multi-used-m:.o=.sdtstub.S) : %.sdtstub.S: $(multi-objs-m)
+       $(call if_changed,sdtstub)
+
+$(multi-used-m:.o=.sdtstub.o) : %.sdtstub.o: %.sdtstub.S
+       $(call if_changed,as_o_S)
+
+$(multi-used-m) : %.o: %.sdtstub.o
+
+quiet_cmd_link_multi-m = LD [M]  $@
+cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $*.sdtstub.o $(cmd_secanalysis)
+
+else
+
 quiet_cmd_link_multi-m = LD [M]  $@
 cmd_link_multi-m = $(cmd_link_multi-y)
 
+endif
+
 $(multi-used-y): FORCE
        $(call if_changed,link_multi-y)
 $(call multi_depend, $(multi-used-y), .o, -objs -y)
index 2ad9dd919661b44cce714a9239e070f580e1babb..9039cd5fb4d0d3e457ca1f4f17ad4f65628edbd4 100644 (file)
@@ -105,8 +105,7 @@ vmlinux.o: FORCE
 $(symverfile):         __modpost ;
 $(modules:.ko=.mod.c): __modpost ;
 
-# Step 5), compile all *.mod.c files (includes the generation of SDT data
-# and SDT stubs)
+# Step 5), compile all *.mod.c files (includes the generation of SDT data)
 
 # modname is set to make c_flags define KBUILD_MODNAME
 modname = $(notdir $(@:.mod.o=))
@@ -115,9 +114,6 @@ quiet_cmd_cc_o_c = CC      $@
       cmd_cc_o_c = $(CC) $(c_flags) $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE) \
                   -I$(dir $@) -c -o $@ $<
 
-quiet_cmd_as_o_S = AS      $@
-      cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
-
 ifdef CONFIG_DTRACE
 
 sdtgen = $(srctree)/scripts/dtrace_sdt.sh
@@ -125,30 +121,16 @@ sdtgen = $(srctree)/scripts/dtrace_sdt.sh
 quiet_cmd_sdtinfo = SDTINF  $@
       cmd_sdtinfo = $(sdtgen) sdtinfo $@ $< kmod
 
-quiet_cmd_sdtstub = SDTSTB  $@
-      cmd_sdtstub = $(sdtgen) sdtstub $@ $<
-
 $(modules:.ko=.sdtinfo.c): %.sdtinfo.c: %.o
        $(call cmd,sdtinfo)
 
-$(modules:.ko=.sdtstub.S) : %.sdtstub.S: %.o
-       $(call cmd,sdtstub)
-
 $(modules:.ko=.mod.o): %.mod.o: %.mod.c %.sdtinfo.c FORCE
        $(call if_changed_dep,cc_o_c)
-
-$(modules:.ko=.sdtstub.o): %.sdtstub.o: %.sdtstub.S
-       $(call if_changed,as_o_S)
-
-module-sdt-modular-prereq = %.sdtstub.o
-
 else
 
 $(modules:.ko=.mod.o): %.mod.o: %.mod.c FORCE
        $(call if_changed_dep,cc_o_c)
 
-module-sdt-modular-prereq =
-
 endif
 
 targets += $(modules:.ko=.mod.o)
@@ -282,7 +264,7 @@ quiet_cmd_ld_ko_o = LD [M]  $@
                             $(patsubst $(ctf-dir)/%,,$(filter-out FORCE,$^)) && \
                    $(OBJCOPY) $(module-ctf-flags) $@.tmp $@ && rm -f $@.tmp
 
-$(modules): %.ko : %.o %.mod.o $(module-sdt-modular-prereq) $(module-ctfs-modular-prereq) FORCE
+$(modules): %.ko : %.o %.mod.o $(module-ctfs-modular-prereq) FORCE
        $(call cmd_touch_ctf)
        $(call if_changed,ld_ko_o)
 
index 8ac053304ad3dc89971d83f956934c06cf5f707d..148af0d92eae63ac5ecfce0339b92f55b720142b 100644 (file)
@@ -2158,8 +2158,7 @@ static int add_versions(struct buffer *b, struct module *mod)
        for (s = mod->unres; s; s = s->next) {
                exp = find_symbol(s->name);
                if (!exp || exp->module == mod) {
-                       if (have_vmlinux && !s->weak &&
-                           !strstarts(s->name, "__dtrace_probe_")) {
+                       if (have_vmlinux && !s->weak) {
                                if (warn_unresolved) {
                                        warn("\"%s\" [%s.ko] undefined!\n",
                                             s->name, mod->name);