Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76bee234 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Michal Marek
Browse files

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: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent abac4c89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -422,7 +422,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);\
	echo | $(CC) $(a_flags) -c -o $(dummy-object) -x assembler -;\
	$(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\