[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
jcarter at mips.com
Fri Dec 7 15:57:56 PST 2012
There are a lot of flags. Here are the ones you ask about:
-KPIC, -call_shared generate SVR4 position independent code
-call_nonpic generate non-PIC code that can operate with DSOs
-mvxworks-pic generate VxWorks position independent code
-non_shared do not generate code that can operate with DSOs
-xgot assume a 32 bit GOT
Just to make things fun, the SGI notion of cpic (call pic) fits gnu's -call_nonpic.
Remember, this issue is not whether the direct or standalone assembler can deal with it in their code. The problem is how to convey it to the <target>ELFObjectWriter in a clean manor because both use it. Some flags are picked by being the default, some from the commandline and others from the run of play. It is not a difficult issue except we require the ELF portion to work from the same sketch book for the 2 assemblers.
I am experimenting putting in a std::set into the MCSubtargetInfo base class that is for target use and see if I can end my ordeal ;-) Probably only useful for the older targets which have a lot of baggage to support. If that works I can convert it to work with Feature, but that is a bit of overkill at this point.
From: Rafael Espíndola [rafael.espindola at gmail.com]
Sent: Friday, December 07, 2012 1:52 PM
To: Carter, Jack
Subject: Re: [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
On 6 December 2012 17:49, Carter, Jack <jcarter at mips.com> wrote:
> Older targets like Mips had/have assemblers and ABIs that carry a lot of
> The small bit of baggage that is giving me fits is that MipsELFObjectWriter
> needs to know the relocation model (static,pic,cpic), whether we are using
> xgot (-mgot), which abi (old,new), which architecture (32r,64),
> which if any coprocessor or extention instructions are used
So the mips assembler has command line options like -fPIC?
More information about the llvm-dev