Ping. My linker guys want this for dead-stripping.
I can make the change in our fork for our target but I'd rather
make it general, for all targets, if it makes sense.
Thanks
--paulr
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at
cs.uiuc.edu]
> On Behalf Of Robinson, Paul
> Sent: Thursday, August 08, 2013 6:27 PM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] Always put jump tables in code section?
>
> Jump tables (e.g. for dispatching in switch statements) currently
> get emitted to a readonly data section, unless -fPIC is in effect
> in which case they're emitted into the function's code section.
> The code to figure this out (in AsmPrinter::EmitJumpTableInfo())
> is not obvious, although commented, and has a FIXME for yet another
> special case.
>
> There is clear value to co-locating jump tables with the function
> body for -fPIC. I am not so clear on the value of putting them
> in a readonly data section in the non-PIC case. Would it be a
> problem if they were always in the function code section? (And
> for dead-stripping purposes, they should be within the bounds of
> the function symbol, so they need to be emitted a little earlier
> within AsmPrinter::EmitFunctionBody(). No point in having the
> jump tables be their own atom, I think.)
> --paulr
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev