[LLVMdev] [lld] Add target-specific entries to the dynamic table

Shankar Easwaran shankare at codeaurora.org
Tue Oct 8 12:51:27 PDT 2013


You can add a member function in the TargetHandler to override the 
dynamic table that the target wants to create.

Thanks

Shankar Easwaran
On 10/8/2013 2:42 PM, Simon Atanasyan wrote:
> Hi,
>
> I'm going to add MIPS target linking support to LLD. One of the things
> I bumped into is the dynamic table. MIPS ABI declares many additional
> mandatory dynamic table entries like DT_MIPS_LOCAL_GOTNO,
> DT_MIPS_SYMTABNO etc. Some of these entries can be allocated and
> initialized at once, other entries should be allocated in the
> beginning and initialized at the end. For example we need to know the
> number of GOT entries related to local symbols to set the
> DT_MIPS_LOCAL_GOTNO value.
>
> Current DynamicTable external interface is rather solid and allows
> only combined allocation/initialization using DynamicTable::addEntry()
> method.
>
> So my question - what is the correct/best way to improve DynamicTable
> interface and allow to add target-specific entries to the dynamic
> table?
>
> My current idea is to declare abstract base class
> TargetDynTableHandler and factor out the dynamic table's entries
> allocation/initialization to the successors of that class. Is it a
> good way? Maybe it's over complicated.
>
> Regards,
> Simon
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-dev mailing list