]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
MIPS: lib: Remove '.hidden' for local symbols
authorNathan Chancellor <nathan@kernel.org>
Tue, 9 Jun 2026 03:36:25 +0000 (20:36 -0700)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 15 Jun 2026 10:21:31 +0000 (12:21 +0200)
After a recent change in binutils that warns when local symbols have
non-default visibility [1], there are a couple instances when building
arch/mips:

  Assembler messages:
  {standard input}: Warning: local symbol `__memset' has non-default visibility
  Assembler messages:
  {standard input}: Warning: local symbol `__memcpy' has non-default visibility

Remove the '.hidden' directives for these symbols to clear up the
warnings, as they are pointless with a local symbol, which is by
definition hidden. This results in no changes to these symbols in nm's
output when assembled with various copies of binutils.

Closes: https://lore.kernel.org/20260509122517.GA1108596@ax162/
Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c4150acbda1b3ce0602f79cbb7700b39e577be7e
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/lib/memcpy.S
arch/mips/lib/memset.S

index a4b4e805ff135b4009f0a232ca2f2dbd696e984b..84f85aba6f4b866c5faa210713e0a4777091f8c3 100644 (file)
        /* initialize __memcpy if this the first time we execute this macro */
        .ifnotdef __memcpy
        .set __memcpy, 1
-       .hidden __memcpy /* make sure it does not leak */
        .endif
 
        /*
        .if __memcpy == 1
        END(memcpy)
        .set __memcpy, 0
-       .hidden __memcpy
        .endif
 
 .Ll_exc_copy\@:
index 79405c32cc853397c1c46e1d97937309f56f12be..ab087406da66adb063b886ae85759b3e749fe3ba 100644 (file)
@@ -89,7 +89,6 @@
        /* Initialize __memset if this is the first time we call this macro */
        .ifnotdef __memset
        .set __memset, 1
-       .hidden __memset /* Make sure it does not leak */
        .endif
 
        sltiu           t0, a2, STORSIZE        /* very small region? */
        .if __memset == 1
        END(memset)
        .set __memset, 0
-       .hidden __memset
        .endif
 
 #ifdef CONFIG_CPU_NO_LOAD_STORE_LR