Displaying 20 results from an estimated 20 matches for "addreloc".
Did you mean:
add_reloc
2016 Feb 03
2
lld dynamic relocation creation issue
...R_AARCH64_RELATIV 7a8
Where 0x7a8 (dynamic relocation r_addend) points to a function at
.text segment (in this case frame_dummy).
I am trying to made this on lld, but current step sequence is:
- Write::run
\_ Write::createSections
\_ Write::scanRelocs
\_ Write::addReloc // Dynamic Relocation creation
\_ Write::writeSections
\_ OutputSectionBase::writeTo
\_ InputSection::writeTo
\_ InputSection::relocate
\_ TargetInfo::relocateOne
The problem is only at TargetInfo::relocate the target (aarch64) will see
that the relocation...
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
...PLT || E == R_TLSDESC)
@@ -808,6 +812,10 @@ static void processRelocAux(InputSectionBase &Sec, RelExpr Expr, RelType Type,
Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Sym});
return;
}
+ if (Sym.isGnuIFunc() && Config->ZIfuncnoplt) {
+ InX::RelaDyn->addReloc(Type, &Sec, Offset, &Sym, Addend, R_ADDEND, Type);
+ return;
+ }
bool CanWrite = (Sec.Flags & SHF_WRITE) || !Config->ZText;
if (CanWrite) {
// R_GOT refers to a position in the got, even if the symbol is preemptible.
@@ -977,7 +985,7 @@ static void scanReloc(InputSecti...
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...
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....
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) {
>> +...
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 emitWordB...
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;
>>>> + }
>>>&g...
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+...
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 e...
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++;
>>>>>>>>> + }
>>>>>>>>>...
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 CPUSubt...
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