Revert "ANDROID: modpost: add an exception for CFI stubs"
This reverts commit e525d2cfbe652f4e287a7f84ce397d4f751d3aed. Reason for revert: not present in android11-5.4 Change-Id: If175677a9002962baf605e632c74435f659e0420 Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
committed by
basamaryan
parent
fa0cd620e3
commit
9124f74b06
@@ -945,7 +945,6 @@ static const char *const head_sections[] = { ".head.text*", NULL };
|
|||||||
static const char *const linker_symbols[] =
|
static const char *const linker_symbols[] =
|
||||||
{ "__init_begin", "_sinittext", "_einittext", NULL };
|
{ "__init_begin", "_sinittext", "_einittext", NULL };
|
||||||
static const char *const optim_symbols[] = { "*.constprop.*", NULL };
|
static const char *const optim_symbols[] = { "*.constprop.*", NULL };
|
||||||
static const char *const cfi_symbols[] = { "*.cfi", NULL };
|
|
||||||
|
|
||||||
enum mismatch {
|
enum mismatch {
|
||||||
TEXT_TO_ANY_INIT,
|
TEXT_TO_ANY_INIT,
|
||||||
@@ -1176,16 +1175,6 @@ static const struct sectioncheck *section_mismatch(
|
|||||||
* names to work. (One situation where gcc can autogenerate ELF
|
* names to work. (One situation where gcc can autogenerate ELF
|
||||||
* local symbols is when "-fsection-anchors" is used.)
|
* local symbols is when "-fsection-anchors" is used.)
|
||||||
*
|
*
|
||||||
* Pattern 7:
|
|
||||||
* With CONFIG_CFI_CLANG, clang appends .cfi to all indirectly called
|
|
||||||
* functions and creates a function stub with the original name. This
|
|
||||||
* stub is always placed in .text, even if the actual function with the
|
|
||||||
* .cfi postfix is in .init.text or .exit.text.
|
|
||||||
* This pattern is identified by
|
|
||||||
* tosec = init or exit section
|
|
||||||
* fromsec = text section
|
|
||||||
* tosym = *.cfi
|
|
||||||
*
|
|
||||||
**/
|
**/
|
||||||
static int secref_whitelist(const struct sectioncheck *mismatch,
|
static int secref_whitelist(const struct sectioncheck *mismatch,
|
||||||
const char *fromsec, const char *fromsym,
|
const char *fromsec, const char *fromsym,
|
||||||
@@ -1228,12 +1217,6 @@ static int secref_whitelist(const struct sectioncheck *mismatch,
|
|||||||
if (strstarts(fromsym, ".L"))
|
if (strstarts(fromsym, ".L"))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Check for pattern 7 */
|
|
||||||
if (match(fromsec, text_sections) &&
|
|
||||||
match(tosec, init_exit_sections) &&
|
|
||||||
match(tosym, cfi_symbols))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user