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
312b1485fb
. 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>
This commit is contained in:
Родитель
a0871e8cb8
Коммит
27b1833279
|
@ -90,7 +90,6 @@
|
||||||
/* .data section */
|
/* .data section */
|
||||||
#define DATA_DATA \
|
#define DATA_DATA \
|
||||||
*(.data) \
|
*(.data) \
|
||||||
*(.data.init.refok) \
|
|
||||||
*(.ref.data) \
|
*(.ref.data) \
|
||||||
DEV_KEEP(init.data) \
|
DEV_KEEP(init.data) \
|
||||||
DEV_KEEP(exit.data) \
|
DEV_KEEP(exit.data) \
|
||||||
|
@ -289,8 +288,6 @@
|
||||||
*(.text.hot) \
|
*(.text.hot) \
|
||||||
*(.text) \
|
*(.text) \
|
||||||
*(.ref.text) \
|
*(.ref.text) \
|
||||||
*(.text.init.refok) \
|
|
||||||
*(.exit.text.refok) \
|
|
||||||
DEV_KEEP(init.text) \
|
DEV_KEEP(init.text) \
|
||||||
DEV_KEEP(exit.text) \
|
DEV_KEEP(exit.text) \
|
||||||
CPU_KEEP(init.text) \
|
CPU_KEEP(init.text) \
|
||||||
|
|
|
@ -62,14 +62,6 @@
|
||||||
#define __refdata __section(.ref.data)
|
#define __refdata __section(.ref.data)
|
||||||
#define __refconst __section(.ref.rodata)
|
#define __refconst __section(.ref.rodata)
|
||||||
|
|
||||||
/* backward compatibility note
|
|
||||||
* A few places hardcode the old section names:
|
|
||||||
* .text.init.refok
|
|
||||||
* .data.init.refok
|
|
||||||
* .exit.text.refok
|
|
||||||
* They should be converted to use the defines from this file
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* compatibility defines */
|
/* compatibility defines */
|
||||||
#define __init_refok __ref
|
#define __init_refok __ref
|
||||||
#define __initdata_refok __refdata
|
#define __initdata_refok __refdata
|
||||||
|
|
|
@ -794,15 +794,6 @@ static const char *init_exit_sections[] =
|
||||||
/* data section */
|
/* data section */
|
||||||
static const char *data_sections[] = { DATA_SECTIONS, NULL };
|
static const char *data_sections[] = { DATA_SECTIONS, NULL };
|
||||||
|
|
||||||
/* sections that may refer to an init/exit section with no warning */
|
|
||||||
static const char *initref_sections[] =
|
|
||||||
{
|
|
||||||
".text.init.refok*",
|
|
||||||
".exit.text.refok*",
|
|
||||||
".data.init.refok*",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* symbols in .data that may refer to init/exit sections */
|
/* symbols in .data that may refer to init/exit sections */
|
||||||
static const char *symbol_white_list[] =
|
static const char *symbol_white_list[] =
|
||||||
|
@ -915,11 +906,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
|
||||||
/**
|
/**
|
||||||
* Whitelist to allow certain references to pass with no warning.
|
* Whitelist to allow certain references to pass with no warning.
|
||||||
*
|
*
|
||||||
* Pattern 0:
|
|
||||||
* Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
|
|
||||||
* The pattern is identified by:
|
|
||||||
* fromsec = .text.init.refok* | .data.init.refok*
|
|
||||||
*
|
|
||||||
* Pattern 1:
|
* Pattern 1:
|
||||||
* If a module parameter is declared __initdata and permissions=0
|
* If a module parameter is declared __initdata and permissions=0
|
||||||
* then this is legal despite the warning generated.
|
* then this is legal despite the warning generated.
|
||||||
|
@ -958,10 +944,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
|
||||||
static int secref_whitelist(const char *fromsec, const char *fromsym,
|
static int secref_whitelist(const char *fromsec, const char *fromsym,
|
||||||
const char *tosec, const char *tosym)
|
const char *tosec, const char *tosym)
|
||||||
{
|
{
|
||||||
/* Check for pattern 0 */
|
|
||||||
if (match(fromsec, initref_sections))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* Check for pattern 1 */
|
/* Check for pattern 1 */
|
||||||
if (match(tosec, init_data_sections) &&
|
if (match(tosec, init_data_sections) &&
|
||||||
match(fromsec, data_sections) &&
|
match(fromsec, data_sections) &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче