--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -1532,6 +1532,15 @@ is_hidden_symbol (asymbol *sym)
   return false;
 }
 
+static void
+clear_visibility (asymbol *sym)
+{
+  elf_symbol_type *elf_sym = elf_symbol_from (sym);
+
+  if (elf_sym != NULL)
+    elf_sym->internal_elf_sym.st_other &= ~ELF_ST_VISIBILITY (~0);
+}
+
 /* Empty name is hopefully never a valid symbol name.  */
 static const char * empty_name = "";
 
@@ -1765,6 +1774,7 @@ filter_symbols (bfd *abfd, bfd *obfd, as
 	    {
 	      flags &= ~(BSF_GLOBAL | BSF_WEAK);
 	      flags |= BSF_LOCAL;
+	      clear_visibility (sym);
 	    }
 
 	  else if (!undefined
--- a/binutils/testsuite/binutils-all/localize-hidden-1.d
+++ b/binutils/testsuite/binutils-all/localize-hidden-1.d
@@ -4,15 +4,15 @@
 #name: --localize-hidden test 1
 #warning_output: localize-hidden-1.l
 #...
-0+1200 l .*\*ABS\*	0+ \.hidden Lhidden
-0+1300 l .*\*ABS\*	0+ \.internal Linternal
-0+1400 l .*\*ABS\*	0+ \.protected Lprotected
+0+1200 l .*\*ABS\*	0+ (\.hidden )?Lhidden
+0+1300 l .*\*ABS\*	0+ (\.internal )?Linternal
+0+1400 l .*\*ABS\*	0+ (\.protected )?Lprotected
 0+1100 l .*\*ABS\*	0+ Ldefault
 #...
-0+2200 l .*\*ABS\*	0+ \.hidden Ghidden
-0+2300 l .*\*ABS\*	0+ \.internal Ginternal
-0+3200 l .*\*ABS\*	0+ \.hidden Whidden
-0+3300 l .*\*ABS\*	0+ \.internal Winternal
+0+2200 l .*\*ABS\*	0+ Ghidden
+0+2300 l .*\*ABS\*	0+ Ginternal
+0+3200 l .*\*ABS\*	0+ Whidden
+0+3300 l .*\*ABS\*	0+ Winternal
 #...
 0+2100 g .*\*ABS\*	0+ Gdefault
 0+2400 g .*\*ABS\*	0+ \.protected Gprotected
