search for: addrelocation

Displaying 20 results from an estimated 20 matches for "addrelocation".

2016 Feb 03
2
lld dynamic relocation creation issue
Hi all, Working on lld aarch64 support I came across an issue where I am not sure which would be best design approach to solve. The aarch64 R_AARCH64_ABS64 relocation for PIC/PIE build requires a dynamic relocation (R_AARCH64_RELATIVE) with the value set as the addend of the relocation. For instance, when linking the crtbeginS.o which contains: Relocation section '.rela.init_array' at
2007 Dec 13
0
[LLVMdev] Exception handling in JIT
...e if it makes sense for this to maintain it's own >> buffers. Can it be modified to use MachineCodeEmitter? >> >> > > You mean DwarfEmitter inherits MachineCodeEmitter? There are > MachineCodeEmitter functions that are really not related to > MachineCodeEmitter (eg addRelocation, getConstantPoolEntryAddress, > etc). How about just passing it a ptr to a MachineCodeEmitter object? > > Again, I've sent you the patch too fast. These functions are taken > from > the g++ unwinder library (libgcc_s.so). Declaring them like I did is > really bad. I'...
2006 Apr 13
0
[LLVMdev] standalone llvm
On Apr 12, 2006, at 10:23 PM, Simon Burton wrote: > > Is it possible to get llvm to generate native machine code > without using gcc and friends ? Do I use lli ? llc. llc --help lists all the options. it compiles llvm bytecode files. > > I'd like to directly create executable code that i can > stick in memory somewhere and jump into (call). > > (I'm looking
2018 Aug 21
7
[lld] avoid emitting PLT entries for ifuncs
Hello, We've recently started using ifuncs in the x86(_64) FreeBSD kernel. Currently lld will emit a PLT entry for each ifunc, so ifunc calls are more expensive that those of regular functions. In our kernel, this overhead isn't really necessary: if lld instead emits PC-relative relocations for each ifunc call site, where each relocation references a symbol of type GNU_IFUNC, then during
2006 Apr 13
1
[LLVMdev] standalone llvm
...to get something to work ? Simon. $ llc -filetype=dynlib -f -o=helloworld.so helloworld.bc llc: target 'X86' does not support generation of this file type! $ llc -filetype=obj -f -mcpu=i386 -march=x86 -o=helloworld.o helloworld.bc llc: ELFWriter.cpp:81: virtual void llvm::ELFCodeEmitter::addRelocation(const llvm::MachineRelocation&): Assertion `0 && "relo not handled yet!"' failed. llc((anonymous namespace)::PrintStackTrace()+0x1a)[0x8ac5736] llc((anonymous namespace)::SignalHandler(int)+0xed)[0x8ac59cb] [0xffffe420] /lib/tls/libc.so.6(abort+0x1d2)[0xb7dc7fa2] /lib/tls/...
2006 Apr 13
4
[LLVMdev] standalone llvm
Is it possible to get llvm to generate native machine code without using gcc and friends ? Do I use lli ? I'd like to directly create executable code that i can stick in memory somewhere and jump into (call). (I'm looking to use llvm in a BSD licensed project). Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...> > I am not sure if it makes sense for this to maintain it's own > buffers. Can it be modified to use MachineCodeEmitter? > > You mean DwarfEmitter inherits MachineCodeEmitter? There are MachineCodeEmitter functions that are really not related to MachineCodeEmitter (eg addRelocation, getConstantPoolEntryAddress, etc). >> + >> + MachineModuleInfo* MMI; >> +public: >> + virtual ~DwarfEmitter() {} >> + >> + /// startFunction - This callback is invoked when the specified >> function is >> + /// about to be code generated. Thi...
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...mp;F) { >> + MCE->setCurrentPtr(CurBufferPtr); >> + return false; >> + } >> + virtual void startFunctionStub(unsigned StubSize, unsigned >> Alignment) {} >> + virtual void *finishFunctionStub(const Function *F) { return 0; } >> + virtual void addRelocation(const llvm::MachineRelocation&) { } >> + virtual void emitByte(unsigned char B) { >> + CurBufferPtr++; >> + } >> + virtual void emitWordLE(unsigned W) { >> + CurBufferPtr+=4; >> + } >> + virtual void emitWordBE(unsigned W) { >> + Cur...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...hFunction(MachineFunction &F) { > + MCE->setCurrentPtr(CurBufferPtr); > + return false; > + } > + virtual void startFunctionStub(unsigned StubSize, unsigned > Alignment) {} > + virtual void *finishFunctionStub(const Function *F) { return 0; } > + virtual void addRelocation(const llvm::MachineRelocation&) { } > + virtual void emitByte(unsigned char B) { > + CurBufferPtr++; > + } > + virtual void emitWordLE(unsigned W) { > + CurBufferPtr+=4; > + } > + virtual void emitWordBE(unsigned W) { > + CurBufferPtr+=4; > + } > +...
2008 Apr 01
0
[LLVMdev] Being able to know the jitted code-size before emitting
...MCE->setCurrentPtr(CurBufferPtr); >>> + return false; >>> + } >>> + virtual void startFunctionStub(unsigned StubSize, unsigned >>> Alignment) {} >>> + virtual void *finishFunctionStub(const Function *F) { return 0; } >>> + virtual void addRelocation(const llvm::MachineRelocation&) { } >>> + virtual void emitByte(unsigned char B) { >>> + CurBufferPtr++; >>> + } >>> + virtual void emitWordLE(unsigned W) { >>> + CurBufferPtr+=4; >>> + } >>> + virtual void emitWordBE(uns...
2008 Apr 04
3
[LLVMdev] Being able to know the jitted code-size before emitting
...rBufferPtr); >>>> + return false; >>>> + } >>>> + virtual void startFunctionStub(unsigned StubSize, unsigned >>>> Alignment) {} >>>> + virtual void *finishFunctionStub(const Function *F) { return 0; } >>>> + virtual void addRelocation(const llvm::MachineRelocation&) { } >>>> + virtual void emitByte(unsigned char B) { >>>> + CurBufferPtr++; >>>> + } >>>> + virtual void emitWordLE(unsigned W) { >>>> + CurBufferPtr+=4; >>>> + } >>>> +...
2008 Apr 05
2
[LLVMdev] Being able to know the jitted code-size before emitting
...t;> + } >>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned >>>>>> Alignment) {} >>>>>> + virtual void *finishFunctionStub(const Function *F) { return >>>>>> 0; } >>>>>> + virtual void addRelocation(const llvm::MachineRelocation&) { } >>>>>> + virtual void emitByte(unsigned char B) { >>>>>> + CurBufferPtr++; >>>>>> + } >>>>>> + virtual void emitWordLE(unsigned W) { >>>>>> + CurBufferPtr+=4; &...
2008 Apr 05
0
[LLVMdev] Being able to know the jitted code-size before emitting
...t;>>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned >>>>>>> Alignment) {} >>>>>>> + virtual void *finishFunctionStub(const Function *F) { return >>>>>>> 0; } >>>>>>> + virtual void addRelocation(const llvm::MachineRelocation&) >>>>>>> { } >>>>>>> + virtual void emitByte(unsigned char B) { >>>>>>> + CurBufferPtr++; >>>>>>> + } >>>>>>> + virtual void emitWordLE(unsigned W) { &...
2008 Apr 04
0
[LLVMdev] Being able to know the jitted code-size before emitting
...alse; >>>>> + } >>>>> + virtual void startFunctionStub(unsigned StubSize, unsigned >>>>> Alignment) {} >>>>> + virtual void *finishFunctionStub(const Function *F) { return >>>>> 0; } >>>>> + virtual void addRelocation(const llvm::MachineRelocation&) { } >>>>> + virtual void emitByte(unsigned char B) { >>>>> + CurBufferPtr++; >>>>> + } >>>>> + virtual void emitWordLE(unsigned W) { >>>>> + CurBufferPtr+=4; >>>>>...
2008 Apr 07
2
[LLVMdev] Being able to know the jitted code-size before emitting
...t;> + virtual void startFunctionStub(unsigned StubSize, unsigned >>>>>>>> Alignment) {} >>>>>>>> + virtual void *finishFunctionStub(const Function *F) { return >>>>>>>> 0; } >>>>>>>> + virtual void addRelocation(const llvm::MachineRelocation&) >>>>>>>> { } >>>>>>>> + virtual void emitByte(unsigned char B) { >>>>>>>> + CurBufferPtr++; >>>>>>>> + } >>>>>>>> + virtual void emitWo...
2008 Apr 07
0
[LLVMdev] Being able to know the jitted code-size before emitting
...ize, unsigned >>>>>>>>> Alignment) {} >>>>>>>>> + virtual void *finishFunctionStub(const Function *F) >>>>>>>>> { return >>>>>>>>> 0; } >>>>>>>>> + virtual void addRelocation(const llvm::MachineRelocation&) >>>>>>>>> { } >>>>>>>>> + virtual void emitByte(unsigned char B) { >>>>>>>>> + CurBufferPtr++; >>>>>>>>> + } >>>>>>>>> + v...
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...Type = RelocType; + } + + // struct relocation_info (8 bytes) + MachO::any_relocation_info MRE; + MRE.r_word0 = FixupOffset; + MRE.r_word1 = ((Index << 0) | (IsPCRel << 24) | (Log2Size << 25) | + (IsExtern << 27) | (Type << 28)); + + Writer->addRelocation(Fragment->getParent(), MRE); + + if (IsExtern) + FixedValue = 0; +} + +MCObjectWriter *llvm::createAArch64MachOObjectWriter(raw_ostream &OS, + uint32_t CPUType, + uint32_t CPUSubtype)...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
On Dec 10, 2007, at 9:52 AM, Nicolas Geoffray wrote: > Hi everyone, > > Here's a patch that enables exception handling when jitting. I've > copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may > need > to factorize it, but the functionality is there and I'm very happy > with > it :) Very nice! I don't know enough about EH, someone else
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the