From 52daf9d821c963f84dd312ff90921bfe1b1cc0a1 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 10 May 2013 16:00:11 -0700 Subject: LLVM: Add ELF Note section to NaCl object files identifying them as such to gold This is needed to switch the native linker to one based on upstream binutils 2.23 R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=2971 also related to bug https://code.google.com/p/nativeclient/issues/detail?id=3424 Review URL: https://codereview.chromium.org/15067009 --- tools/llvm-mc/llvm-mc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index 243899bb88..11304454f0 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -20,6 +20,7 @@ #include "llvm/MC/MCContext.h" #include "llvm/MC/MCInstPrinter.h" #include "llvm/MC/MCInstrInfo.h" +#include "llvm/MC/MCNaCl.h" #include "llvm/MC/MCObjectFileInfo.h" #include "llvm/MC/MCParser/AsmLexer.h" #include "llvm/MC/MCRegisterInfo.h" @@ -453,6 +454,11 @@ int main(int argc, char **argv) { Str.reset(TheTarget->createMCObjectStreamer(TripleName, Ctx, *MAB, FOS, CE, RelaxAll, NoExecStack)); + // @LOCALMOD-BEGIN + Triple T(TripleName); + if (T.isOSNaCl()) + initializeNaClMCStreamer(*Str.get(), Ctx, T); + // @LOCALMOD-END } int Res = 1; -- cgit v1.2.3-18-g5258