Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: lib/MC/MCNaCl.cpp

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- lib/MC/MCNaCl.cpp - NaCl-specific MC implementation ----------------===// 1 //===- lib/MC/MCNaCl.cpp - NaCl-specific MC implementation ----------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 #include "llvm/MC/MCNaCl.h" 10 #include "llvm/MC/MCNaCl.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // For gas, override the size of DWARF address values generated by .loc 56 // For gas, override the size of DWARF address values generated by .loc
57 // directives. 57 // directives.
58 if (TheTriple.getArch() == Triple::x86_64 && 58 if (TheTriple.getArch() == Triple::x86_64 &&
59 Streamer.hasRawTextSupport()) { 59 Streamer.hasRawTextSupport()) {
60 Streamer.EmitRawText("\t.dwarf_addr_size 4\n"); 60 Streamer.EmitRawText("\t.dwarf_addr_size 4\n");
61 } 61 }
62 // Emit an ELF Note section in its own COMDAT group which identifies NaCl 62 // Emit an ELF Note section in its own COMDAT group which identifies NaCl
63 // object files to the gold linker, so it can use the NaCl layout. 63 // object files to the gold linker, so it can use the NaCl layout.
64 const MCSection *Note = Ctx.getELFSection( 64 const MCSection *Note = Ctx.getELFSection(
65 NoteName, ELF::SHT_NOTE, ELF::SHF_ALLOC | ELF::SHF_GROUP, 65 NoteName, ELF::SHT_NOTE, ELF::SHF_ALLOC | ELF::SHF_GROUP, 0, NoteName);
66 SectionKind::getReadOnly(), 0, NoteName);
67 66
68 Streamer.PushSection(); 67 Streamer.PushSection();
69 Streamer.SwitchSection(Note); 68 Streamer.SwitchSection(Note);
70 Streamer.EmitIntValue(strlen(NoteNamespace) + 1, 4); 69 Streamer.EmitIntValue(strlen(NoteNamespace) + 1, 4);
71 Streamer.EmitIntValue(strlen(NoteArch) + 1, 4); 70 Streamer.EmitIntValue(strlen(NoteArch) + 1, 4);
72 Streamer.EmitIntValue(ELF::NT_VERSION, 4); 71 Streamer.EmitIntValue(ELF::NT_VERSION, 4);
73 Streamer.EmitBytes(NoteNamespace); 72 Streamer.EmitBytes(NoteNamespace);
74 Streamer.EmitIntValue(0, 1); // NUL terminator 73 Streamer.EmitIntValue(0, 1); // NUL terminator
75 Streamer.EmitValueToAlignment(4); 74 Streamer.EmitValueToAlignment(4);
76 Streamer.EmitBytes(NoteArch); 75 Streamer.EmitBytes(NoteArch);
77 Streamer.EmitIntValue(0, 1); // NUL terminator 76 Streamer.EmitIntValue(0, 1); // NUL terminator
78 Streamer.EmitValueToAlignment(4); 77 Streamer.EmitValueToAlignment(4);
79 Streamer.PopSection(); 78 Streamer.PopSection();
80 } 79 }
81 80
82 } // namespace llvm 81 } // namespace llvm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698