+2020-04-22 Alan Modra <amodra@gmail.com>
+
+ * config/obj-elf.c (elf_frob_symbol): Unconditionally remove
+ symbol for ".symver .. remove".
+ * doc/as.texi (.symver): Update.
+ * testsuite/gas/symver/symver11.s: Make foo weak.
+ * testsuite/gas/symver/symver11.d: Expect an error.
+ * testsuite/gas/symver/symver7.d: Allow other random symbols.
+
2020-04-21 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/gas/symver/symver11.s: Add ".balign 8".
elfsym->internal_elf_sym.st_other |= STV_HIDDEN;
break;
case visibility_remove:
- /* Remove the symbol if it isn't used in relocation. */
- if (!symbol_used_in_reloc_p (symp))
- symbol_remove (symp, &symbol_rootP, &symbol_lastP);
+ symbol_remove (symp, &symbol_rootP, &symbol_lastP);
break;
case visibility_local:
S_CLEAR_EXTERNAL (symp);
symbol from a shared library, then @var{nodename} should correspond to the
nodename of the symbol you are trying to override. The optional argument
@var{visibility} updates the visibility of the original symbol. The valid
-visibilities are @code{local}, @code {hidden}, and @code {remove}. The
+visibilities are @code{local}, @code{hidden}, and @code{remove}. The
@code{local} visibility makes the original symbol a local symbol
(@pxref{Local}). The @code{hidden} visibility sets the visibility of the
original symbol to @code{hidden} (@pxref{Hidden}). The @code{remove}
-visibility removes the original symbol from the symbol table if it isn't
-used in relocation. If visibility isn't specified, the original symbol
-is unchanged.
+visibility removes the original symbol from the symbol table. If visibility
+isn't specified, the original symbol is unchanged.
If the symbol @var{name} is not defined within the file being assembled, all
references to @var{name} will be changed to @var{name2@@nodename}. If no