Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove unused support code for refok sections.

The old refok sections

.text.init.refok
.data.init.refok
.exit.text.refok

have been deprecated since commit
312b1485fb509c9bc32eda28ad29537896658cb8. After the other patches in
this patch series nothing is put in these sections, so clean things up
by eliminating all the remaining references to them.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Tim Abbott and committed by
Linus Torvalds
27b18332 a0871e8c

-29
-3
include/asm-generic/vmlinux.lds.h
··· 90 90 /* .data section */ 91 91 #define DATA_DATA \ 92 92 *(.data) \ 93 - *(.data.init.refok) \ 94 93 *(.ref.data) \ 95 94 DEV_KEEP(init.data) \ 96 95 DEV_KEEP(exit.data) \ ··· 288 289 *(.text.hot) \ 289 290 *(.text) \ 290 291 *(.ref.text) \ 291 - *(.text.init.refok) \ 292 - *(.exit.text.refok) \ 293 292 DEV_KEEP(init.text) \ 294 293 DEV_KEEP(exit.text) \ 295 294 CPU_KEEP(init.text) \
-8
include/linux/init.h
··· 62 62 #define __refdata __section(.ref.data) 63 63 #define __refconst __section(.ref.rodata) 64 64 65 - /* backward compatibility note 66 - * A few places hardcode the old section names: 67 - * .text.init.refok 68 - * .data.init.refok 69 - * .exit.text.refok 70 - * They should be converted to use the defines from this file 71 - */ 72 - 73 65 /* compatibility defines */ 74 66 #define __init_refok __ref 75 67 #define __initdata_refok __refdata
-18
scripts/mod/modpost.c
··· 794 794 /* data section */ 795 795 static const char *data_sections[] = { DATA_SECTIONS, NULL }; 796 796 797 - /* sections that may refer to an init/exit section with no warning */ 798 - static const char *initref_sections[] = 799 - { 800 - ".text.init.refok*", 801 - ".exit.text.refok*", 802 - ".data.init.refok*", 803 - NULL 804 - }; 805 - 806 797 807 798 /* symbols in .data that may refer to init/exit sections */ 808 799 static const char *symbol_white_list[] = ··· 906 915 /** 907 916 * Whitelist to allow certain references to pass with no warning. 908 917 * 909 - * Pattern 0: 910 - * Do not warn if funtion/data are marked with __init_refok/__initdata_refok. 911 - * The pattern is identified by: 912 - * fromsec = .text.init.refok* | .data.init.refok* 913 - * 914 918 * Pattern 1: 915 919 * If a module parameter is declared __initdata and permissions=0 916 920 * then this is legal despite the warning generated. ··· 944 958 static int secref_whitelist(const char *fromsec, const char *fromsym, 945 959 const char *tosec, const char *tosym) 946 960 { 947 - /* Check for pattern 0 */ 948 - if (match(fromsec, initref_sections)) 949 - return 0; 950 - 951 961 /* Check for pattern 1 */ 952 962 if (match(tosec, init_data_sections) && 953 963 match(fromsec, data_sections) &&