aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2013-05-10 16:00:11 -0700
committerDerek Schuff <dschuff@chromium.org>2013-05-10 16:00:11 -0700
commit52daf9d821c963f84dd312ff90921bfe1b1cc0a1 (patch)
tree8f94ccf4841f2a0bbfdb19bf3b230f7ad220e8ff /tools
parent42ac59f56fb0d473f84b6be738a64e80b09557d1 (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp6
1 files changed, 6 insertions, 0 deletions
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;