mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-19 11:16:32 +00:00
generic: fix warning orphan section from module exports in aarch64
kernel linux now have 2 different export.h include, one from linux/export.h and one from asm-generic/export.h While most of our target user linux/export.h, aarch64 based target use asm-generic/export.h that is not patched with the changes of 221-module_exports. Patch also this additional header to fix multiple aarch64-openwrt-linux-musl-ld: warning: orphan section `__ksymtab_strings' from `arch/arm64/kernel/head.o' being placed in section `__ksymtab_strings' warning during kernel compilation. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
8857387913
commit
4b924fe6df
@ -89,6 +89,30 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
"__kstrtab_" #sym ": \n" \
|
"__kstrtab_" #sym ": \n" \
|
||||||
" .asciz \"" #sym "\" \n" \
|
" .asciz \"" #sym "\" \n" \
|
||||||
"__kstrtabns_" #sym ": \n" \
|
"__kstrtabns_" #sym ": \n" \
|
||||||
|
--- a/include/asm-generic/export.h
|
||||||
|
+++ b/include/asm-generic/export.h
|
||||||
|
@@ -26,6 +26,12 @@
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
+#ifdef MODULE
|
||||||
|
+#define __EXPORT_SUFFIX(name)
|
||||||
|
+#else
|
||||||
|
+#define __EXPORT_SUFFIX(name) + #name
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* note on .section use: we specify progbits since usage of the "M" (SHF_MERGE)
|
||||||
|
* section flag requires it. Use '%progbits' instead of '@progbits' since the
|
||||||
|
@@ -42,7 +42,7 @@
|
||||||
|
__ksymtab_\name:
|
||||||
|
__put \val, __kstrtab_\name
|
||||||
|
.previous
|
||||||
|
- .section __ksymtab_strings,"aMS",%progbits,1
|
||||||
|
+ .section __ksymtab_strings __EXPORT_SUFFIX(name),"aMS",%progbits,1
|
||||||
|
__kstrtab_\name:
|
||||||
|
.asciz "\name"
|
||||||
|
.previous
|
||||||
--- a/scripts/Makefile.build
|
--- a/scripts/Makefile.build
|
||||||
+++ b/scripts/Makefile.build
|
+++ b/scripts/Makefile.build
|
||||||
@@ -367,7 +367,7 @@ targets += $(lib-y) $(always-y) $(MAKECM
|
@@ -367,7 +367,7 @@ targets += $(lib-y) $(always-y) $(MAKECM
|
||||||
|
@ -89,6 +89,30 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
"__kstrtab_" #sym ": \n" \
|
"__kstrtab_" #sym ": \n" \
|
||||||
" .asciz \"" #sym "\" \n" \
|
" .asciz \"" #sym "\" \n" \
|
||||||
"__kstrtabns_" #sym ": \n" \
|
"__kstrtabns_" #sym ": \n" \
|
||||||
|
--- a/include/asm-generic/export.h
|
||||||
|
+++ b/include/asm-generic/export.h
|
||||||
|
@@ -26,6 +26,12 @@ struct kernel_symbol {
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
+#ifdef MODULE
|
||||||
|
+#define __EXPORT_SUFFIX(name)
|
||||||
|
+#else
|
||||||
|
+#define __EXPORT_SUFFIX(name) + #name
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* note on .section use: we specify progbits since usage of the "M" (SHF_MERGE)
|
||||||
|
* section flag requires it. Use '%progbits' instead of '@progbits' since the
|
||||||
|
@@ -42,7 +42,7 @@ struct kernel_symbol {
|
||||||
|
__ksymtab_\name:
|
||||||
|
__put \val, __kstrtab_\name
|
||||||
|
.previous
|
||||||
|
- .section __ksymtab_strings,"aMS",%progbits,1
|
||||||
|
+ .section __ksymtab_strings __EXPORT_SUFFIX(name),"aMS",%progbits,1
|
||||||
|
__kstrtab_\name:
|
||||||
|
.asciz "\name"
|
||||||
|
.previous
|
||||||
--- a/scripts/Makefile.build
|
--- a/scripts/Makefile.build
|
||||||
+++ b/scripts/Makefile.build
|
+++ b/scripts/Makefile.build
|
||||||
@@ -396,7 +396,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
|
@@ -396,7 +396,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
|
||||||
|
Loading…
Reference in New Issue
Block a user