Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kbuild: cmd_export_list: tighten the sed script

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>
Signed-off-by: Michal Marek <mmarek@suse.com>

authored by

Nicolas Pitre and committed by
Michal Marek
76bee234 abac4c89

+1 -1
+1 -1
scripts/Makefile.build
··· 422 422 423 423 quiet_cmd_export_list = EXPORTS $@ 424 424 cmd_export_list = $(OBJDUMP) -h $< | \ 425 - sed -ne '/___ksymtab/{s/.*+/$(ref_prefix)/;s/ .*/)/;p}' >$(ksyms-lds);\ 425 + sed -ne '/___ksymtab/s/.*+\([^ ]*\).*/$(ref_prefix)\1)/p' >$(ksyms-lds);\ 426 426 rm -f $(dummy-object);\ 427 427 echo | $(CC) $(a_flags) -c -o $(dummy-object) -x assembler -;\ 428 428 $(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\