search for: mcsymboldata

Displaying 18 results from an estimated 18 matches for "mcsymboldata".

2015 May 13
3
[LLVMdev] RFC: Merge MCSymbol with MCSymbolData, optimizing for object file emission
Right now MC is optimized for emitting assembly, but as Rafael pointed out to me over IRC the optimized path should be emitting object files. This WIP patch moves MCSymbolData into MCSymbol.h and makes it a field inside MCSymbol. This eliminates a pointer from MCSymbolData back to MCSymbol, the DenseMap<const MCSymbol *, MCSymbolData *> in MCAssembler, and converts the iplist in MCAssembler into a std::vector (along with some churn to pass around MCSymbols instead...
2010 May 07
0
[LLVMdev] MCStreamer interface
...t he'd like to fix or if this is an important design decision. The reason for MCSectionCOFF etc., is that they are shared between the MC and CodeGen interfaces. They have semantics that apply to both .s files and object files, and even the frontend has some interest in them. OTOH, things like MCSymbolData, MCSectionData, are private to the assembler backend, and so only the assembler and object writer need to know about them (they are unused when writing to a .s file, for example). MCAssembler already maintains its own association of these data structures, and there are a few bits available for the...
2010 May 06
2
[LLVMdev] MCStreamer interface
On May 5, 2010, at 5:22 PM, Nathan Jeffords wrote: > > The logic to handle this has to go somewhere, putting it in the MCStreamer *implementation* that needs it is the most logical place. We also aim to implement an assembler, it doesn't make sense to duplicate this logic in the compiler and the assembler parser. > > > Assembly language has often been *the* intermediate
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...MCCodeEmitter &CE, > raw_ostream &OS); > > + void OnSectionDataCreated(MCSection const *Section, > + MCSectionData *SectionData); > + > + void OnSymbolDataCreated(MCSymbol const *Symbol, > + MCSymbolData *SymbolData); These aren't used, can you just remove them and add them when they actually are needed? > + MCSectionData *getSectionData(MCSection const *Section = 0); > + MCSymbolData *getSymbolData(MCSymbol const *Symbol); > + > + void AddFragment(MCFragment *Fragment); This...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer
2009 Aug 31
1
[LLVMdev] VS2005 fix for MCAssembler.cpp
Dear llvm-dev, The attached patch fixes the following error when building LLVM with VS2005: lib\MC\MCAssembler.cpp(931) : error C2354: 'llvm::MCSymbolData::Symbol' : initialization of reference member requires a temporary variable Best regards, Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090831/c58cf066/attachment.html> -------------- next pa...
2012 Oct 16
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Hi Greg, I'm afraid I've not looked into the infrastructure Jim put into place, so I've not really been able to answer the "how should I do it" questions, but hopefully I can comment on the ABI. > And probably questions for Tim, are these "section-relative" mapping > symbols, as defined in 4.6.5.1 of the ELF for ARM document? Yes, they are. > And what
2012 Oct 17
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
...SetSection(".bss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC, SectionKind::getBSS()); EmitCodeAlignment(4, 0); + EmitMappingSymbol(/*IsData*/true); } }; } @@ -188,6 +200,55 @@ void MCELFStreamer::EmitThumbFunc(MCSymbol *Func) { MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Func); SD.setFlags(SD.getFlags() | ELF_Other_ThumbFunc); + + // Use this flag to output Thumb symbols after data sections. + IsThumb = true; + + // FIXME: Instead, emit the correct mapping symbol at .text + EmitMappingSymbol(/*IsData*/false); +...
2010 Jun 14
0
[LLVMdev] Win32 COFF Support
...=// Please fix the filename in the comment line. +#include <llvm/MC/MCObjectWriter.h> +#include <llvm/ADT/SmallString.h> +#include <llvm/ADT/SmallVector.h> Please use "" style includes for llvm headers. +namespace coff { + + using llvm::raw_ostream; + using llvm::MCSymbolData; + using llvm::MCSectionData; Please don't use 'using' directives in headers. + uint8_t * Ptr = reinterpret_cast <uint8_t *> (Data); + Ptr [0] = (Value & 0x000000FF) >> 0; It would be more consistent to space this sort of thing as: + uint8_t *Ptr = reint...
2010 Jun 12
3
[LLVMdev] Win32 COFF Support
Here is a full patch including Nathan's COFF support, tests that pass on Windows, and some changes to lit. Obviously the COFF support and changes to lit should be separate patches in the end. http://codereview.appspot.com/1624043/show - Michael Spencer -------------- next part -------------- A non-text attachment was scrubbed... Name: COFF-support.patch Type: application/octet-stream Size:
2012 Oct 16
2
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Attached is an example of how to reproduce the issue. It uses a C file that happens to has a bunch of switch statements which are encoded as jump tables, giving us data-in-code. Usage: To build object files with clang via the -integrated-as versus via GCC: $ export NDK_DIR=<my_ndk_dir> $ export LLVM_DIR=<my_llvm_bin_dir> $ make To test that the generated objects contain the same
2010 Jun 14
2
[LLVMdev] Win32 COFF Support
...+#include <llvm/MC/MCObjectWriter.h> > +#include <llvm/ADT/SmallString.h> > +#include <llvm/ADT/SmallVector.h> > > Please use "" style includes for llvm headers. > > > > +namespace coff { > + > + using llvm::raw_ostream; > + using llvm::MCSymbolData; > + using llvm::MCSectionData; > > Please don't use 'using' directives in headers. > > > > + uint8_t * Ptr = reinterpret_cast <uint8_t *> (Data); > + Ptr [0] = (Value & 0x000000FF) >> 0; > > It would be more consistent to space this...
2011 Nov 01
6
[LLVMdev] Proposal: MCLinker - an LLVM integrated linker
...vel abstraction without the concern about targets and formats. In order to simplify linking and improve performance, MCLinker defines its own symbol data structures, called LDSymbol, instead of using MCSymbol directly. Symbols defined in LLVM are separated into two different classes – MCSymbol and MCSymbolData, and they are very different from the symbols' definition in most object files. If a linker adopts them as the data structure of symbols, it needs extra overhead to convert symbols of object files into MCSymbol and MCSymbolData. In order to overcome this problem, the definition of LDSymbol is c...
2012 Oct 16
5
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Getting closer... When emitting symbols, how do I set the symbol's value to the address of the current instruction? Do I need to emit a label in the current section and another that uses the former to point to the latter? If possible, a code sample would be very helpful. And probably questions for Tim, are these "section-relative" mapping symbols, as defined in 4.6.5.1 of the
2011 Nov 02
0
[LLVMdev] Proposal: MCLinker - an LLVM integrated linker
...action without the concern about targets and formats. > > In order to simplify linking and improve performance, MCLinker defines its own symbol data structures, called LDSymbol, instead of using MCSymbol directly. Symbols defined in LLVM are separated into two different classes – MCSymbol and MCSymbolData, and they are very different from the symbols' definition in most object files. If a linker adopts them as the data structure of symbols, it needs extra overhead to convert symbols of object files into MCSymbol and MCSymbolData. In order to overcome this problem, the definition of LDSymbol is c...
2010 Jul 17
1
[LLVMdev] Win32 COFF Support - Patch 3
On Fri, Jul 16, 2010 at 11:25 AM, Daniel Dunbar <daniel at zuster.org> wrote: > Hi Michael, > > Overall patch looks good. I do have a few comments below. My main > comment is please try to make the style match that used in the > MCMachOStreamer more closely. I intend to refactor more functionality > into the base MCObjectStreamer class, and having them use consistent >
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...MachOObjectWriter : public MCMachObjectTargetWriter { + + bool requiresExternRelocation(MachObjectWriter *Writer, + const MCAssembler &Asm, + const MCFragment &Fragment, unsigned RelocType, + const MCSymbolData *SD, uint64_t FixedValue); + +public: + AArch64MachOObjectWriter(uint32_t CPUType, uint32_t CPUSubtype); + + virtual ~AArch64MachOObjectWriter(); + +protected: + virtual void + RecordRelocation(MachObjectWriter *Writer, const MCAssembler &Asm, + const MCAsmLayout &Layo...
2010 Jun 14
0
[LLVMdev] Win32 COFF Support
...gt;> +#include <llvm/ADT/SmallString.h> >> +#include <llvm/ADT/SmallVector.h> >> >> Please use "" style includes for llvm headers. >> >> >> >> +namespace coff { >> + >> + using llvm::raw_ostream; >> + using llvm::MCSymbolData; >> + using llvm::MCSectionData; >> >> Please don't use 'using' directives in headers. >> >> >> >> + uint8_t * Ptr = reinterpret_cast <uint8_t *> (Data); >> + Ptr [0] = (Value & 0x000000FF) >> 0; >> >> I...