Skip to content

Commit 76bee23

Browse files
Nicolas PitreMichal Marek
Nicolas Pitre
authored and
Michal Marek
committed
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 <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent abac4c8 commit 76bee23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/Makefile.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ endif
422422

423423
quiet_cmd_export_list = EXPORTS $@
424424
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);\
426426
rm -f $(dummy-object);\
427427
echo | $(CC) $(a_flags) -c -o $(dummy-object) -x assembler -;\
428428
$(LD) $(ld_flags) -r -o $@ -T $(ksyms-lds) $(dummy-object);\

0 commit comments

Comments
 (0)