[llvm] r227228 - [ExecutionEngine] Add weak symbol support to RuntimeDyld

Lang Hames lhames at gmail.com
Mon Mar 9 16:57:19 PDT 2015


Hi Keno,

r231724 and r231726 should get us most of the way towards re-introducing
your patch. I see a couple more steps before we get all the way there
though:

1) Teach RuntimeDyld to let strong definitions squash weak ones when
building the symbol table. This will ensure that relocations resolve
correctly within a single RuntimeDyld instance.

2) Teach RTDyldMemoryManager and MCJIT to pass around
RuntimeDyld::SymbolInfo data structures. This will allow us to perform
lookup correctly in the casen where people chain MCJIT instances.

The second change will require some community consultation. It's not
technically a change to the C-API, but it will hit all C-API users with
custom memory managers. They'll want a heads up so they can prepare.

- Lang.


On Tue, Feb 24, 2015 at 3:36 PM, Keno Fischer <kfischer at college.harvard.edu>
wrote:

> Hi Lang,
>
> it's not actively causing problems for me right now, but I expect it will
> in the near future. Let me know if you have a patch I can take a look at.
>
> Keno
>
> On Fri, Feb 20, 2015 at 8:17 PM, Lang Hames <lhames at gmail.com> wrote:
>
>> Hi Keno,
>>
>> I've had a chance to look at this at long last. It turns out
>> AbortOnFailure is innocent (if ugly), the problem is actually in
>> getSymbolAddress. With this patch it doesn't return an address for weak
>> symbols, so RuntimeDyld clients can't see weak symbols. We probably
>> shouldn't just expose them either though: There would be no way for a
>> client to tell the difference between a weak symbol and a strong one.
>>
>> I think we actually need to add a weak/strong flag to the symbol table,
>> along the same lines as the visibility flag. I've filed
>> http://llvm.org/PR22653 to track this.
>>
>> Is this issue actively causing problems for you? I expect I'll want to
>> deal with it soonish either way, but if it's an active headache for you
>> I'll try to make it sooner rather than later.
>>
>> Cheers,
>> Lang.
>>
>> On Wed, Feb 4, 2015 at 2:14 PM, Lang Hames <lhames at gmail.com> wrote:
>>
>>> Hi Keno,
>>>
>>> Sorry I haven't gotten to this yet. I haven't forgotten about it - I'm
>>> planning to get it fixed up tomorrow or Friday.
>>>
>>> Cheers,
>>> Lang.
>>>
>>>
>>> On Tue, Jan 27, 2015 at 5:48 PM, Keno Fischer <
>>> kfischer at college.harvard.edu> wrote:
>>>
>>>> No problem.
>>>>
>>>> On Tue, Jan 27, 2015 at 8:33 PM, Lang Hames <lhames at gmail.com> wrote:
>>>>
>>>>> Hi Keno,
>>>>>
>>>>> Sorry - I had to revert in r227287. Hopefully I'll have a solution
>>>>> soon.
>>>>>
>>>>> - Lang.
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150310/06897f99/attachment.html>


More information about the llvm-commits mailing list