[LLVMdev] [lld] Handle _GLOBAL_OFFSET_TABLE symbol

Simon Atanasyan simon at atanasyan.com
Mon Oct 21 13:47:44 PDT 2013


The Hexagon target adds new atom using the addAbsoluteAtom() functions
and then assigns a virtual address in the finalizeSymbolValues()
routine. The X86_64 target uses addAtom() function to add an object of
the GLOBAL_OFFSET_TABLEAtom class to do the same thing. What is the
reason of this difference? Is the GLOBAL_OFFSET_TABLEAtom just a
useful wrapper which eliminates the necessity to assign an address to
the atom explicitly in the finalizeSymbolValues() routine?

On Tue, Oct 22, 2013 at 12:16 AM, Shankar Easwaran
<shankare at codeaurora.org> wrote:
> Its a DefinedAtom whose value is set by the Target Handlers.
>
> On 10/21/2013 3:08 PM, Simon Atanasyan wrote:
>> What is a recommended way of handling (define, assign value)
>> _GLOBAL_OFFSET_TABLE symbol? It looks like Hexagon and X86_64 targets
>> use different API to achieve the same result.

-- 
Simon



More information about the llvm-dev mailing list