[llvm-commits] [PATCH] Fix MCJIT running global constructors

Renato Golin rengolin at systemcall.org
Fri Nov 16 02:37:36 PST 2012


I thought I had done it myself ages ago... oh well.

LGTM.

cheers,
--renato

On 16 November 2012 10:17, Amara Emerson <amara.emerson at arm.com> wrote:
> Hi,
>
> Currently MCJIT on ARM cannot handle R_ARM_TARGET1 relocations which are
> needed for relocating .init_array, and so C++ static global constructors do
> not run.
>
> The attached patch adds support for this relocation, and also fixes another
> bug which prevents the global ctors from running. Currently the RuntimeDyld
> adds only _global_ symbols to the GlobalSymbolAddress data structure during
> symbol reading, however I believe this is meant to be interpreted as (global
> (symbol table)) rather than ((global symbol) table). Since clang emits the
> constructors with internal linkage, the ExecutionEngine fails to find the
> constructor and dies.
>
> Test case included. Ok to commit?
>
> Amara
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
cheers,
--renato

http://systemcall.org/



More information about the llvm-commits mailing list