File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -831,6 +831,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
831831
832832/* Required sections not related to debugging. */
833833#define ELF_DETAILS \
834+ .modinfo : { *(.modinfo) } \
834835 .comment 0 : { *(.comment) } \
835836 .symtab 0 : { *(.symtab) } \
836837 .strtab 0 : { *(.strtab) } \
@@ -1044,7 +1045,6 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
10441045 *(.discard.*) \
10451046 *(.export_symbol) \
10461047 *(.no_trim_symbol) \
1047- *(.modinfo) \
10481048 /* ld.bfd warns about .gnu.version* even when not emitted */ \
10491049 * (.gnu .version * ) \
10501050
Original file line number Diff line number Diff line change @@ -86,11 +86,14 @@ endif
8686# vmlinux
8787# ---------------------------------------------------------------------------
8888
89- remove-section-y :=
89+ remove-section-y := .modinfo
9090remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel*'
9191
92+ # To avoid warnings: "empty loadable segment detected at ..." from GNU objcopy,
93+ # it is necessary to remove the PT_LOAD flag from the segment.
9294quiet_cmd_strip_relocs = OBJCOPY $@
93- cmd_strip_relocs = $(OBJCOPY) $(addprefix --remove-section=,$(remove-section-y)) $< $@
95+ cmd_strip_relocs = $(OBJCOPY) $(patsubst %,--set-section-flags %=noload,$(remove-section-y)) $< $@; \
96+ $(OBJCOPY) $(addprefix --remove-section=,$(remove-section-y)) $@
9497
9598targets += vmlinux
9699vmlinux: vmlinux.unstripped FORCE
Original file line number Diff line number Diff line change 7979/ _SDA_BASE_$ /d
8080/ _SDA2_BASE_$ /d
8181
82+ # MODULE_INFO()
83+ / __UNIQUE_ID_modinfo[0-9] * $ /d
84+
8285# ---------------------------------------------------------------------------
8386# Ignored patterns
8487# (symbols that contain the pattern are ignored)
You can’t perform that action at this time.
0 commit comments