[LLVMdev] [lld][ELF] How to transfer st_other field value from input to output file

Shankar Easwaran shankare at codeaurora.org
Tue Nov 11 11:39:46 PST 2014


On 11/11/2014 1:19 PM, Nick Kledzik wrote:
>   had a similar issue with arm vs thumb in mach-o.  Each function’s thumbness is marked in its symbol table entry.
>
> But it is even worse, a function could change encoding in the middle (only hand coded assembly could do this).
>
> My solution was to add a new Reference Kind for mach-o which is the current instruction encoding.  The offsetInAtom() is the offset where the encoding kind changes.  Usually there is just one at offset zero that sets the encoding for the whole function.  So determining the thumbness requires scanning the References.  But it turns out in practice the scan is rarely done because the result can be cached by whatever algorithm needs that info
lld needs to have some way to encode flavor specific attributes/target 
specific attributes. This is becoming more important IMHO.

Shankar Easwaran

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




More information about the llvm-dev mailing list