On Fri, Feb 22 2019, Brad Smith <[email protected]> wrote:
> Merge in a diff from base:
>
> Improve the X86FixupGadgets pass
>
> Merge in a bug fix from upstream:
>
> [MC] Make symbol version errors non-fatal
Regarding this part, should the fix go into base llvm/clang too?
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/devel/llvm/Makefile,v
> retrieving revision 1.213
> diff -u -p -u -p -r1.213 Makefile
> --- Makefile 20 Feb 2019 00:24:11 -0000 1.213
> +++ Makefile 22 Feb 2019 14:33:44 -0000
> @@ -20,7 +20,7 @@ PKGSPEC-main = llvm-=${LLVM_V}
> PKGNAME-main = llvm-${LLVM_V}
> PKGNAME-python = py-llvm-${LLVM_V}
> PKGNAME-lldb = lldb-${LLVM_V}
> -REVISION-main = 6
> +REVISION-main = 7
> REVISION-lldb = 0
> CATEGORIES = devel
> DISTFILES = llvm-${LLVM_V}.src${EXTRACT_SUFX} \
> Index: patches/patch-lib_MC_ELFObjectWriter_cpp
> ===================================================================
> RCS file: patches/patch-lib_MC_ELFObjectWriter_cpp
> diff -N patches/patch-lib_MC_ELFObjectWriter_cpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-lib_MC_ELFObjectWriter_cpp 22 Feb 2019 14:36:33 -0000
> @@ -0,0 +1,34 @@
> +$OpenBSD$
> +
> +[MC] Make symbol version errors non-fatal
> +
> +Index: lib/MC/ELFObjectWriter.cpp
> +--- lib/MC/ELFObjectWriter.cpp.orig
> ++++ lib/MC/ELFObjectWriter.cpp
> +@@ -1258,14 +1258,20 @@ void
> ELFObjectWriter::executePostLayoutBinding(MCAssem
> + if (!Symbol.isUndefined() && !Rest.startswith("@@@"))
> + continue;
> +
> +- // FIXME: produce a better error message.
> ++ // FIXME: Get source locations for these errors or diagnose them
> earlier.
> + if (Symbol.isUndefined() && Rest.startswith("@@") &&
> +- !Rest.startswith("@@@"))
> +- report_fatal_error("A @@ version cannot be undefined");
> ++ !Rest.startswith("@@@")) {
> ++ Asm.getContext().reportError(SMLoc(), "versioned symbol " + AliasName
> +
> ++ " must be defined");
> ++ continue;
> ++ }
> +
> +- if (Renames.count(&Symbol) && Renames[&Symbol] != Alias)
> +- report_fatal_error(llvm::Twine("Multiple symbol versions defined for
> ") +
> +- Symbol.getName());
> ++ if (Renames.count(&Symbol) && Renames[&Symbol] != Alias) {
> ++ Asm.getContext().reportError(
> ++ SMLoc(), llvm::Twine("multiple symbol versions defined for ") +
> ++ Symbol.getName());
> ++ continue;
> ++ }
> +
> + Renames.insert(std::make_pair(&Symbol, Alias));
> + }
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE