Skip to content

Commit

Permalink
Revert "modpost: skip ELF local symbols during section mismatch check"
Browse files Browse the repository at this point in the history
This reverts commit a4d26f1.

The variable 'fromsym' never starts with ".L" since commit 87e5b1e
("module: Sync code of is_arm_mapping_symbol()").

In other words, Pattern 6 is now dead code.

Previously, the .LANCHOR1 hid the symbols listed in Pattern 2.

87e5b1e provided a better solution.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
  • Loading branch information
Masahiro Yamada committed May 28, 2023
1 parent c584476 commit 17b53f1
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,6 @@ static const struct sectioncheck *section_mismatch(
* fromsec = text section
* refsymname = *.constprop.*
*
* Pattern 6:
* Hide section mismatch warnings for ELF local symbols. The goal
* is to eliminate false positive modpost warnings caused by
* compiler-generated ELF local symbol names such as ".LANCHOR1".
* Autogenerated symbol names bypass modpost's "Pattern 2"
* whitelisting, which relies on pattern-matching against symbol
* names to work. (One situation where gcc can autogenerate ELF
* local symbols is when "-fsection-anchors" is used.)
**/
static int secref_whitelist(const struct sectioncheck *mismatch,
const char *fromsec, const char *fromsym,
Expand Down Expand Up @@ -1092,10 +1084,6 @@ static int secref_whitelist(const struct sectioncheck *mismatch,
match(fromsym, optim_symbols))
return 0;

/* Check for pattern 6 */
if (strstarts(fromsym, ".L"))
return 0;

return 1;
}

Expand Down

0 comments on commit 17b53f1

Please sign in to comment.