Pull in r327101 from upstream llvm trunk (by Rafael Espindola):
authordim <dim@FreeBSD.org>
Thu, 22 Mar 2018 18:58:34 +0000 (18:58 +0000)
committerdim <dim@FreeBSD.org>
Thu, 22 Mar 2018 18:58:34 +0000 (18:58 +0000)
commitd50c586f855a660ebdecb7e0a9ffa22c820f0ad8
treeef4f21101118deb9eb2675f74e6f91f509de3990
parentcef0ea8f726ef2faa030a2b2e1edd7b0f4638e04
Pull in r327101 from upstream llvm trunk (by Rafael Espindola):

  Don't treat .symver as a regular alias definition.

  This patch starts simplifying the handling of .symver.

  For now it just moves the responsibility for creating an alias down to
  the streamer. With that the asm streamer can pass a .symver unchanged,
  which is nice since gas cannot parse "foo@bar = zed".

  In a followup I hope to move the handling down to the writer so that
  we don't need special hacks for avoiding breaking names with @@@ on
  windows.

Pull in r327160 from upstream llvm trunk (by Rafael Espindola):

  Delay creating an alias for @@@.

  With this we only create an alias for @@@ once we know if it should
  use @ or @@. This avoids last minutes renames and hacks to handle MS
  names.

  This only handles the ELF writer. LTO still has issues with @@@
  aliases.

Pull in r327928 from upstream llvm trunk (by Vitaly Buka):

  Object: Move attribute calculation into RecordStreamer. NFC

  Summary: Preparation for D44274

  Reviewers: pcc, espindola

  Subscribers: hiraditya

  Differential Revision: https://reviews.llvm.org/D44276

Pull in r327930 from upstream llvm trunk (by Vitaly Buka):

  Object: Fix handling of @@@ in .symver directive

  Summary:
  name@@@nodename is going to be replaced with name@@nodename if symbols is
  defined in the assembled file, or name@nodename if undefined.
  https://sourceware.org/binutils/docs/as/Symver.html

  Fixes PR36623

  Reviewers: pcc, espindola

  Subscribers: mehdi_amini, hiraditya

  Differential Revision: https://reviews.llvm.org/D44274

Together, these changes fix handling of @@@ in .symver directives when
doing Link Time Optimization.

Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
MFC after: 3 months
X-MFC-With: r327952
contrib/llvm/include/llvm/MC/MCAssembler.h
contrib/llvm/include/llvm/MC/MCELFStreamer.h
contrib/llvm/include/llvm/MC/MCStreamer.h
contrib/llvm/lib/MC/ELFObjectWriter.cpp
contrib/llvm/lib/MC/MCAsmStreamer.cpp
contrib/llvm/lib/MC/MCELFStreamer.cpp
contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp
contrib/llvm/lib/MC/MCStreamer.cpp
contrib/llvm/lib/Object/ModuleSymbolTable.cpp
contrib/llvm/lib/Object/RecordStreamer.cpp
contrib/llvm/lib/Object/RecordStreamer.h