[all-commits] [llvm/llvm-project] d96af2: [MC] Support .symver *, *, remove

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Mar 6 15:23:17 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d96af2ed2d6cfaa227c82a79d85733bcca4d9084
      https://github.com/llvm/llvm-project/commit/d96af2ed2d6cfaa227c82a79d85733bcca4d9084
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-03-06 (Sat, 06 Mar 2021)

  Changed paths:
    M llvm/include/llvm/MC/MCAssembler.h
    M llvm/include/llvm/MC/MCELFStreamer.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCELFStreamer.cpp
    M llvm/lib/MC/MCParser/ELFAsmParser.cpp
    M llvm/lib/MC/MCStreamer.cpp
    M llvm/lib/Object/RecordStreamer.cpp
    M llvm/lib/Object/RecordStreamer.h
    A llvm/test/MC/ELF/symver-remove.s

  Log Message:
  -----------
  [MC] Support .symver *, *, remove

As a resolution to https://sourceware.org/bugzilla/show_bug.cgi?id=25295 , GNU as
from binutils 2.35 supports the optional third argument for the .symver directive.

'remove' for a non-default version is useful:
`.symver def_v1, def at v1, remove` => def_v1 is not retained in the symbol table.
Previously the user has to strip the original symbol or specify a `local:`
version node in a version script to localize the symbol.

`.symver def, def@@v1, remove` and `.symver def, def@@@v1, remove` are supported
as well, though they are identical to `.symver def, def@@@v1`.

local/hidden are not useful so this patch does not implement them.




More information about the All-commits mailing list