linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: cmd_export_list: tighten the sed script
@ 2016-11-17  0:28 Nicolas Pitre
  2016-12-11 10:52 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pitre @ 2016-11-17  0:28 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kbuild, linux-kernel


When LTO is used, some ___ksymtab_string sections are seen by this sed
script, creating lines containing a single ) such as:

EXPORT(foo)
)
)
EXPORT(bar)

Let's make it so the + character is also required for any line to be
printed.

Signed-off-by: Nicolas Pitre <nico@linaro.org>

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 53b43f26bb..3066c8e61d 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -428,7 +428,7 @@ endif
 
 quiet_cmd_export_list = EXPORTS $@
 cmd_export_list = $(OBJDUMP) -h $< | \
-	sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\
+	sed -ne '/___ksymtab/s/.*+\([^ ]*\).*/$(ref_prefix)\1)/p' >$(ksyms-lds);\
 	rm -f $(dummy-object);\
 	$(AR) rcs$(KBUILD_ARFLAGS) $(dummy-object);\
 	$(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: cmd_export_list: tighten the sed script
  2016-11-17  0:28 [PATCH] kbuild: cmd_export_list: tighten the sed script Nicolas Pitre
@ 2016-12-11 10:52 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-12-11 10:52 UTC (permalink / raw)
  To: Nicolas Pitre; +Cc: linux-kbuild, linux-kernel

On Wed, Nov 16, 2016 at 07:28:39PM -0500, Nicolas Pitre wrote:
> 
> When LTO is used, some ___ksymtab_string sections are seen by this sed
> script, creating lines containing a single ) such as:
> 
> EXPORT(foo)
> )
> )
> EXPORT(bar)
> 
> Let's make it so the + character is also required for any line to be
> printed.
> 
> Signed-off-by: Nicolas Pitre <nico@linaro.org>

Applied to kbuild.git#kbuild.

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-11 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-17  0:28 [PATCH] kbuild: cmd_export_list: tighten the sed script Nicolas Pitre
2016-12-11 10:52 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).