[llvm-dev] Intermodule Program Analysis

Ahmad Nouralizadeh Khorrami via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 23 13:55:15 PDT 2021


So, is static linking the only solution? In some cases, static linking is
difficult!

On Sat, 24 Apr 2021 at 01:16, Jakub (Kuba) Kuderski <kubakuderski at gmail.com>
wrote:

> I haven't used gllvm with shared objects and don't know the details. But
> on high-level, I think that even if your build system produces multiple
> binaries/libraries, you should be able to extract bitcode out of each of
> them, and later link it manually. This obviously won't work for libraries
> that you can't build by yourself.
>
> On Fri, Apr 23, 2021 at 4:40 PM Ahmad Nouralizadeh Khorrami <
> ahmad.llvm at gmail.com> wrote:
>
>> Hi Jakub,
>> Thanks! IIUC, both gllvm and wllvm work on statically linked objects. I
>> mean they work when everything is contained in the linked bitfile.
>> Therefore, probably, they won't solve the problem?!
>> Regards.
>>
>> On Sat, 24 Apr 2021 at 00:43, Jakub (Kuba) Kuderski <
>> kubakuderski at gmail.com> wrote:
>>
>>> Hi Ahmad,
>>>
>>> Maybe gllvm would work for this use case? There was a similar thread in
>>> 2019: https://lists.llvm.org/pipermail/llvm-dev/2019-January/129587.html
>>> .
>>>
>>> -Jakub
>>>
>>> On Fri, Apr 23, 2021 at 4:02 PM Ahmad Nouralizadeh Khorrami via llvm-dev
>>> <llvm-dev at lists.llvm.org> wrote:
>>>
>>>> Hi,
>>>> Typical whole program IR level analyses are done by means of module
>>>> passes. The modules should be linked before the analysis process.
>>>> In some rare cases, the analysis needs to be performed across the whole
>>>> user level code. In other words, suppose that the bitcode files for the
>>>> program and all shared libraries are available. Also, suppose that the
>>>> libraries can not be linked, statically. Is it possible to run an analysis
>>>> (e.g., taint analysis or constant propagation) on the whole user level
>>>> software stack (at the IR level)? If not, is there any better approach?
>>>> Regards.
>>>> _______________________________________________
>>>> LLVM Developers mailing list
>>>> llvm-dev at lists.llvm.org
>>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>>
>>>
>>>
>>> --
>>> Jakub Kuderski
>>>
>>
>
> --
> Jakub Kuderski
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210424/103f69c3/attachment.html>


More information about the llvm-dev mailing list