Let modpost parses vmlinux instead of vmlinux.o
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Let modpost parses vmlinux instead of vmlinux.o
Dear Mr. Rowand,
What do you think about this patch?
Thanks!
Ciao,
Alessio
--- Makefile | 2 +- scripts/Makefile.modpost | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
@@ -876,7 +876,7 @@ quiet_cmd_vmlinux-modpost = LD $@ define rule_vmlinux-modpost : +$(call cmd,vmlinux-modpost) - $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@ + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $* $(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd endef
scripts/Makefile.modpost +1 -1
@@ -93,7 +93,7 @@ __modpost: $(modules:.ko=.o) FORCE quiet_cmd_kernel-mod = MODPOST $@ cmd_kernel-mod = $(modpost) $@ -vmlinux.o: FORCE +vmlinux vmlinux.o: FORCE $(call cmd,kernel-mod) # Declare generated files as targets for modpost
Signature · 1 line
1.7.5.4
Quoted 7 lines · Alessio Igor Bogani
Dear Mr. Rowand,
What do you think about this patch?
Thanks!Ciao,
Alessio
Hi Alession.
I am not Mr. Rowand - obviously...
The title alone looks like you are doing something wrong. The difference between vmlinux.o and vmlinux is that the latter is linked using the linker scripts. So a lot of sections are merged. And modpost uses these section for the section mismatch analysis.
Then your patch fails to describe why it is needed. And on top of this I do not understand the patch.
So a lot of things looks bad :-(
Sam
Quoted 11 lines
--- Makefile | 2 +- scripts/Makefile.modpost | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Makefile +0
-0
Makefile quiet_cmd_vmlinux-modpost = LD $@ · line 879
Quoted 5 lines
Makefile +1
-1@@ -876,7 +876,7 @@ quiet_cmd_vmlinux-modpost = LD $@ define rule_vmlinux-modpost : +$(call cmd,vmlinux-modpost) - $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@ + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $*
I do not see where the stem is coming from - and why this is needed.
Quoted 8 lines
Makefile +0
-0$(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd endefscripts/Makefile.modpost +0
-0
scripts/Makefile.modpost __modpost: $(modules:.ko=.o) FORCE · line 97
Quoted 6 lines
scripts/Makefile.modpost +1
-1@@ -93,7 +93,7 @@ __modpost: $(modules:.ko=.o) FORCE quiet_cmd_kernel-mod = MODPOST $@ cmd_kernel-mod = $(modpost) $@ -vmlinux.o: FORCE +vmlinux vmlinux.o: FORCE $(call cmd,kernel-mod)
It looks like you process both of vmlinux.o and vmlinux?!?!
Quoted 1 line · Alessio Igor Bogani
Dear Mr. Rowand,
No need to be formal, "Frank" is ok.
Quoted 2 lines
What do you think about this patch?
It does not work for me. The resulting Module.symvers is empty.
Before applying the Makefile patch, "make V=1" shows the command to generate Module.symvers is:
scripts/mod/modpost -o /a/home/frowand/me/src/linux/kernel-org/build/crest/Module.symvers -S vmlinux.o
after applying the patch, the command becomes:
scripts/mod/modpost -o /a/home/frowand/me/src/linux/kernel-org/build/crest/Module.symvers -S -s
-Frank
Quoted 36 lines
Thanks!
Ciao,
Alessio--- Makefile | 2 +- scripts/Makefile.modpost | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Makefile +1
-1@@ -876,7 +876,7 @@ quiet_cmd_vmlinux-modpost = LD $@ define rule_vmlinux-modpost : +$(call cmd,vmlinux-modpost) - $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@ + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $* $(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd endefscripts/Makefile.modpost +1
-1@@ -93,7 +93,7 @@ __modpost: $(modules:.ko=.o) FORCE quiet_cmd_kernel-mod = MODPOST $@ cmd_kernel-mod = $(modpost) $@ -vmlinux.o: FORCE +vmlinux vmlinux.o: FORCE $(call cmd,kernel-mod) # Declare generated files as targets for modpost
Quoted 7 lines · Frank Rowand
Quoted 1 line · Alessio Igor Bogani
Dear Mr. Rowand,
No need to be formal, "Frank" is ok.
Quoted 1 line
Quoted 5 lines
Quoted 1 line
What do you think about this patch?
It does not work for me. The resulting Module.symvers is empty.
Before applying the
Makefilepatch, "make V=1" shows the command
^^^ "make V=1 vmlinux"
Quoted 50 lines
to generate Module.symvers is:
scripts/mod/modpost-o /a/home/frowand/me/src/linux/kernel-org/build/crest/Module.symvers -S vmlinux.oafter applying the patch, the command becomes:
scripts/mod/modpost-o /a/home/frowand/me/src/linux/kernel-org/build/crest/Module.symvers -S -s-Frank
Quoted 28 lines
Thanks!
Ciao,
Alessio--- Makefile | 2 +- scripts/Makefile.modpost | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Makefile +1
-1@@ -876,7 +876,7 @@ quiet_cmd_vmlinux-modpost = LD $@ define rule_vmlinux-modpost : +$(call cmd,vmlinux-modpost) - $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@ + $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $* $(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd endefscripts/Makefile.modpost +0
-0scripts/Makefile.modpost __modpost: $(modules:.ko=.o) FORCE · line 99
Quoted 8 lines
scripts/Makefile.modpost +1
-1@@ -93,7 +93,7 @@ __modpost: $(modules:.ko=.o) FORCE quiet_cmd_kernel-mod = MODPOST $@ cmd_kernel-mod = $(modpost) $@ -vmlinux.o: FORCE +vmlinux vmlinux.o: FORCE $(call cmd,kernel-mod) # Declare generated files as targets for modpost.