linux/init: remove __memexit* annotations
commit 6a4e59eeedc3018cb57722eecfcbb49431aeb05f upstream. We have never used __memexit, __memexitdata, or __memexitconst. These were unneeded. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fd06e32ea4
commit
6cddb7a4d7
|
@ -356,7 +356,6 @@
|
||||||
*(.ref.data) \
|
*(.ref.data) \
|
||||||
*(.data..shared_aligned) /* percpu related */ \
|
*(.data..shared_aligned) /* percpu related */ \
|
||||||
MEM_KEEP(init.data*) \
|
MEM_KEEP(init.data*) \
|
||||||
MEM_KEEP(exit.data*) \
|
|
||||||
*(.data.unlikely) \
|
*(.data.unlikely) \
|
||||||
__start_once = .; \
|
__start_once = .; \
|
||||||
*(.data.once) \
|
*(.data.once) \
|
||||||
|
@ -521,7 +520,6 @@
|
||||||
__init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
|
__init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \
|
||||||
*(.ref.rodata) \
|
*(.ref.rodata) \
|
||||||
MEM_KEEP(init.rodata) \
|
MEM_KEEP(init.rodata) \
|
||||||
MEM_KEEP(exit.rodata) \
|
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
/* Built-in module parameters. */ \
|
/* Built-in module parameters. */ \
|
||||||
|
@ -574,7 +572,6 @@
|
||||||
*(.ref.text) \
|
*(.ref.text) \
|
||||||
*(.text.asan.* .text.tsan.*) \
|
*(.text.asan.* .text.tsan.*) \
|
||||||
MEM_KEEP(init.text*) \
|
MEM_KEEP(init.text*) \
|
||||||
MEM_KEEP(exit.text*) \
|
|
||||||
|
|
||||||
|
|
||||||
/* sched.text is aling to function alignment to secure we have same
|
/* sched.text is aling to function alignment to secure we have same
|
||||||
|
@ -714,13 +711,10 @@
|
||||||
*(.exit.data .exit.data.*) \
|
*(.exit.data .exit.data.*) \
|
||||||
*(.fini_array .fini_array.*) \
|
*(.fini_array .fini_array.*) \
|
||||||
*(.dtors .dtors.*) \
|
*(.dtors .dtors.*) \
|
||||||
MEM_DISCARD(exit.data*) \
|
|
||||||
MEM_DISCARD(exit.rodata*)
|
|
||||||
|
|
||||||
#define EXIT_TEXT \
|
#define EXIT_TEXT \
|
||||||
*(.exit.text) \
|
*(.exit.text) \
|
||||||
*(.text.exit) \
|
*(.text.exit) \
|
||||||
MEM_DISCARD(exit.text)
|
|
||||||
|
|
||||||
#define EXIT_CALL \
|
#define EXIT_CALL \
|
||||||
*(.exitcall.exit)
|
*(.exitcall.exit)
|
||||||
|
|
|
@ -89,9 +89,6 @@
|
||||||
__latent_entropy
|
__latent_entropy
|
||||||
#define __meminitdata __section(".meminit.data")
|
#define __meminitdata __section(".meminit.data")
|
||||||
#define __meminitconst __section(".meminit.rodata")
|
#define __meminitconst __section(".meminit.rodata")
|
||||||
#define __memexit __section(".memexit.text") __exitused __cold notrace
|
|
||||||
#define __memexitdata __section(".memexit.data")
|
|
||||||
#define __memexitconst __section(".memexit.rodata")
|
|
||||||
|
|
||||||
/* For assembly routines */
|
/* For assembly routines */
|
||||||
#define __HEAD .section ".head.text","ax"
|
#define __HEAD .section ".head.text","ax"
|
||||||
|
|
|
@ -798,7 +798,7 @@ static void check_section(const char *modname, struct elf_info *elf,
|
||||||
#define ALL_INIT_TEXT_SECTIONS \
|
#define ALL_INIT_TEXT_SECTIONS \
|
||||||
".init.text", ".meminit.text"
|
".init.text", ".meminit.text"
|
||||||
#define ALL_EXIT_TEXT_SECTIONS \
|
#define ALL_EXIT_TEXT_SECTIONS \
|
||||||
".exit.text", ".memexit.text"
|
".exit.text"
|
||||||
|
|
||||||
#define ALL_PCI_INIT_SECTIONS \
|
#define ALL_PCI_INIT_SECTIONS \
|
||||||
".pci_fixup_early", ".pci_fixup_header", ".pci_fixup_final", \
|
".pci_fixup_early", ".pci_fixup_header", ".pci_fixup_final", \
|
||||||
|
@ -806,10 +806,9 @@ static void check_section(const char *modname, struct elf_info *elf,
|
||||||
".pci_fixup_resume_early", ".pci_fixup_suspend"
|
".pci_fixup_resume_early", ".pci_fixup_suspend"
|
||||||
|
|
||||||
#define ALL_XXXINIT_SECTIONS MEM_INIT_SECTIONS
|
#define ALL_XXXINIT_SECTIONS MEM_INIT_SECTIONS
|
||||||
#define ALL_XXXEXIT_SECTIONS MEM_EXIT_SECTIONS
|
|
||||||
|
|
||||||
#define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
|
#define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
|
||||||
#define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS
|
#define ALL_EXIT_SECTIONS EXIT_SECTIONS
|
||||||
|
|
||||||
#define DATA_SECTIONS ".data", ".data.rel"
|
#define DATA_SECTIONS ".data", ".data.rel"
|
||||||
#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
|
#define TEXT_SECTIONS ".text", ".text.*", ".sched.text", \
|
||||||
|
@ -822,7 +821,6 @@ static void check_section(const char *modname, struct elf_info *elf,
|
||||||
#define MEM_INIT_SECTIONS ".meminit.*"
|
#define MEM_INIT_SECTIONS ".meminit.*"
|
||||||
|
|
||||||
#define EXIT_SECTIONS ".exit.*"
|
#define EXIT_SECTIONS ".exit.*"
|
||||||
#define MEM_EXIT_SECTIONS ".memexit.*"
|
|
||||||
|
|
||||||
#define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \
|
#define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \
|
||||||
TEXT_SECTIONS, OTHER_TEXT_SECTIONS
|
TEXT_SECTIONS, OTHER_TEXT_SECTIONS
|
||||||
|
@ -832,7 +830,6 @@ enum mismatch {
|
||||||
DATA_TO_ANY_INIT,
|
DATA_TO_ANY_INIT,
|
||||||
TEXTDATA_TO_ANY_EXIT,
|
TEXTDATA_TO_ANY_EXIT,
|
||||||
XXXINIT_TO_SOME_INIT,
|
XXXINIT_TO_SOME_INIT,
|
||||||
XXXEXIT_TO_SOME_EXIT,
|
|
||||||
ANY_INIT_TO_ANY_EXIT,
|
ANY_INIT_TO_ANY_EXIT,
|
||||||
ANY_EXIT_TO_ANY_INIT,
|
ANY_EXIT_TO_ANY_INIT,
|
||||||
EXTABLE_TO_NON_TEXT,
|
EXTABLE_TO_NON_TEXT,
|
||||||
|
@ -883,12 +880,6 @@ static const struct sectioncheck sectioncheck[] = {
|
||||||
.bad_tosec = { INIT_SECTIONS, NULL },
|
.bad_tosec = { INIT_SECTIONS, NULL },
|
||||||
.mismatch = XXXINIT_TO_SOME_INIT,
|
.mismatch = XXXINIT_TO_SOME_INIT,
|
||||||
},
|
},
|
||||||
/* Do not reference exit code/data from memexit code/data */
|
|
||||||
{
|
|
||||||
.fromsec = { ALL_XXXEXIT_SECTIONS, NULL },
|
|
||||||
.bad_tosec = { EXIT_SECTIONS, NULL },
|
|
||||||
.mismatch = XXXEXIT_TO_SOME_EXIT,
|
|
||||||
},
|
|
||||||
/* Do not use exit code/data from init code */
|
/* Do not use exit code/data from init code */
|
||||||
{
|
{
|
||||||
.fromsec = { ALL_INIT_SECTIONS, NULL },
|
.fromsec = { ALL_INIT_SECTIONS, NULL },
|
||||||
|
@ -1017,7 +1008,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
|
||||||
|
|
||||||
/* symbols in data sections that may refer to meminit sections */
|
/* symbols in data sections that may refer to meminit sections */
|
||||||
if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
|
if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
|
||||||
match(tosec, PATTERNS(ALL_XXXINIT_SECTIONS, ALL_XXXEXIT_SECTIONS)) &&
|
match(tosec, PATTERNS(ALL_XXXINIT_SECTIONS)) &&
|
||||||
match(fromsym, PATTERNS("*driver")))
|
match(fromsym, PATTERNS("*driver")))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue