Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] implementing PIC for linux x86-64"
2008 Jun 06
2
[LLVMdev] [patch] add support for PIC on linux x86-64
On Fri, 2008-06-06 at 17:08 +0100, Rafael Espindola wrote:
> 2008/6/6 Anton Korobeynikov <asl at math.spbu.ru>:
> > Hello, Rafael
> >
> > Awesome! But... -ENOPATCH :(
>
> Attached now.
Hi Rafael,
Thanks a lot for working on this!
I have one question about the patch; why did you choose too add a new
enum, PICCallStyle, instead of reusing (possibly with some
2008 Jun 06
0
[LLVMdev] [patch] add support for PIC on linux x86-64
On Jun 6, 2008, at 11:55 AM, Dan Gohman wrote:
> On Fri, 2008-06-06 at 17:08 +0100, Rafael Espindola wrote:
>> 2008/6/6 Anton Korobeynikov <asl at math.spbu.ru>:
>>> Hello, Rafael
>>>
>>> Awesome! But... -ENOPATCH :(
>>
>> Attached now.
>
> Hi Rafael,
>
> Thanks a lot for working on this!
>
> I have one question about the
2008 Jun 06
0
[LLVMdev] [patch] add support for PIC on linux x86-64
2008/6/6 Anton Korobeynikov <asl at math.spbu.ru>:
> Hello, Rafael
>
> Awesome! But... -ENOPATCH :(
Attached now.
Thanks,
--
Rafael Avila de Espindola
Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland
Registered in Dublin, Ireland
Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86-64-plt.patch
Type:
2008 Jun 06
2
[LLVMdev] [patch] add support for PIC on linux x86-64
Hello, Rafael
> With this patch I was able to bootstrap gcc in linux x86-64 with
> shared libraries enabled :-)
Awesome! But... -ENOPATCH :(
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.
2017 Oct 04
2
Relocations used for PPC32 in non-PIC mode
Hello,
I am currently facing an issue at linking stage when compiling basic C code for an embedded PPC32 platform and linking with LLD. For external symbol linkage LLVM appears to use PLT which results in generating a R_PPC_PLTREL24 relocation, that is not support by LDD. Therefore even such a basic example cannot be built:
/* s.c */
int f() { return 0; }
/* t.c */
int f();
int _start() {
2008 May 30
1
[LLVMdev] implementing PIC for linux x86-64
Hello, Rafael
> On linux X86_64, calls to local but externally visible functions
> should use the PLT. Access to local (same compilation unit), variables
> can just use RIP relative access.
Right, this is just optimization. AFAIR, current code already does this
for 'normal' PIC - it just checks for linkage and doesn't assemble call
via PLT for stuff with internal linkage.
2017 Oct 04
2
Relocations used for PPC32 in non-PIC mode
Hal,
I very well understand that LDD may not be in a good state for PPC32, and it would definitely need some improvements sooner or later. In fact I even submitted a patch adding a relocation to ldd just a few hours ago.
However, this particular case is not related to LDD, it is a design issue and furthermore a regression in LLVM itself. I checked gcc, and neither does it try to use PLT and
2008 Jun 07
1
[LLVMdev] [patch] add support for PIC on linux x86-64
> Yes, please remove PICCallStyle and have printPLT check for pic
> relocation model and Subtarget.isTargetELF().
Done.
> And where you are modifying this part of the code. Please rename
> printGOT, printStub, and printPLT to something that indicates they are
> predicate functions. Perhaps shouldPrintGOT, etc.?
Done.
Updated patch attached.
> Thanks,
>
> Evan
Cheers,
2008 Jun 06
0
[LLVMdev] [patch] add support for PIC on linux x86-64
The attached patch adds support for PIC on linux x86-64. It also adds
some tests. The patch fixes tests 1, 10 and 11. I would like to keep
all tests, since I find the assembler printer code a bit hard to read,
and I like to have tests around to find out if a change does what I
think it does.
With this patch I was able to bootstrap gcc in linux x86-64 with
shared libraries enabled :-)
Cheers,
--
2016 Oct 27
1
PIC and mcmodel=large on x86 doesn't use any relocations
> Message: 4
> Date: Thu, 27 Oct 2016 22:04:28 +0200
> From: Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org>
> To: llvm-dev at lists.llvm.org
> Subject: Re: [llvm-dev] PIC and mcmodel=large on x86 doesn't use any
> relocations
> Message-ID: <20161027200428.GA2177 at britannica.bec.de>
> Content-Type: text/plain; charset=us-ascii
>
> On
2014 Mar 14
2
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
Hi Rafael,
Yes, merging gv prevents linker to do garbage collection. Should it be implemented as a peephole pass? If we do it too early, the distance between GVs are not fixed yet.
PS:
Below is the GCC output with "extern" hidden:
ldr r2, .L2
stmfd sp!, {r3, lr}
.save {r3, lr}
.LPIC0:
add r0, pc, r2
bl _Z4initPv(PLT)
ldr r1, .L2+4
.LPIC1:
add r0, pc, r1
bl _Z4initPv(PLT)
ldr
2016 Oct 31
1
PIC and mcmodel=large on x86 doesn't use any relocations
>
> Message: 2
> Date: Sat, 29 Oct 2016 22:36:41 +0200
> From: Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org>
> To: llvm-dev at lists.llvm.org
> Subject: Re: [llvm-dev] PIC and mcmodel=large on x86 doesn't use any
> relocations
> Message-ID: <20161029203641.GB20270 at britannica.bec.de>
> Content-Type: text/plain; charset=us-ascii
>
2014 Mar 14
3
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
>> Any thoughs?
>
> I'm now struggling to see how GCC justifies it. What if a different
> translation-unit declared those variables in a different order? I also
> can't get the same behaviour here, do you have a more complete
> command-line?
Ah, I see; the translation-unit that does the optimisation needs to
have them as a definition (i.e. "= {0}") rather
2018 Jul 10
6
[RISCV][PIC] Lowering pseudo instructions in MCCodeEmitter vs AsmPrinter
H all,
I'm looking at generating PIC code for RISC-V in the context of Linux. Not
sure if anyone is working on this already, any inputs are very welcome.
I'm now looking at function calls which in the RISCV backend are
represented via two pseudoinstructions RISCV::TAIL and RISCV::CALL.
Currently those pseudos are lowered in MCCodeEmitter. They are expanded
into AUIPC and JALR
2008 Feb 15
1
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hey Evan,
At the point of the instructions you suggested I step through, X86ISelLowering has this state:
- this 0x00000000005fe728 {VarArgsFrameIndex=-842150451 RegSaveFrameIndex=-842150451 VarArgsGPOffset=3452816845 ...} llvm::X86TargetLowering * const
+ llvm::TargetLowering {TM={...} TD=0x00000000008edac0
2008 Feb 15
0
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
On Feb 12, 2008, at 5:26 PM, Chuck Rose III wrote:
> Hola LLVMers,
>
> I’m debugging through some strangeness that I’m seeing on X64 on
> windows with LLVM2.2. I had to change the code so that it would
> engage the x64 target machine on windows builds, but I’ve otherwise
> left LLVM 2.2 alone. The basic idea is that I’ve got a function bar
> which is compiled by
2016 Oct 27
1
PIC and mcmodel=large on x86 doesn't use any relocations
We're at the point in our port of OpenVMS to x86 using LLVM to make choices
on mcmodel. Given OpenVMS's history, our linker will allocate static data
(ie, .data, .bss, .plt, GOT, etc.) in the bottom 32-bits of address space
(ie, 00000000.xxxxxxxx). However, we support code anywhere in the 64-bit
address space as PIC code (we do this on Itanium today using our own
code-generator and
2007 Dec 04
0
[LLVMdev] I will be out awhile
I know I am just back from vacations, but I am sorry to inform I will
be out for some time. I am changing jobs here at Google and for some
time I will have to do a bit of both. This would make it hard for me
to keep track of a very vivid project like LLVM.
The good news Is that this should last no more the 4 months from now
and that I am moving to a software developer position that should be a
2015 Jan 26
2
[LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms
Hi Lang,
Yeah, I remember this case. Basically what’s happening is that there are relocations for ELF on x86 that use a value that is present in the object image as part of the calculation for the final value that goes in the same location. If you ever find yourself applying relocations for a second time (for instance, because the loaded object location is remapped for out-of-proc execution)
2011 Oct 21
2
[LLVMdev] Typo in IsLegalToCallImmediateAddr?
Rafael,
I believe MachO can't represent this relocation, even in non-PIC mode.
On my Mac, I tried compiling "call 256". I got:
in section __TEXT,__text reloc 0: R_ABS reloc but no absolute symbol
at target address
I believe the correct thing to do is:
isTargetELF() && TM.getRelocationModel() == Reloc::Static
This will do the right thing on ELF, and the right thing on