[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
Rafael EspĂndola
rafael.espindola at gmail.com
Sat Dec 8 10:42:47 PST 2012
On 7 December 2012 18:57, Carter, Jack <jcarter at mips.com> wrote:
> Hi Rafael,
>
> 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.
Awesome. As a though exercise I would suggest forgetting for the
moment that llvm even has a codegen module. Just pick one of the above
options and an example .s where it changes the output and then make
llvm-mc do the same.
Without knowing what the options do it is hard to guess what the best
change would be, but a first try would be extending
MCELFObjectTargetWriter.
Can you post an example of a .s where one of the above options makes a
difference? I.E., can you write a test that should pass once the
option is implemented in llvm-mc? Having a concrete example should
make it easier to discuss.
> Cheers,
>
> Jack
>
Cheers,
Rafael
More information about the llvm-dev
mailing list