[llvm-dev] DragonEgg for gcc-5 and llvm-3.6

Arun Prabhu via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 28 05:42:45 PDT 2015


My brother (Tarun) and I have been attempting to get dragonegg working with
gcc-5 and llvm-3.6. So far we have had some success and most of the
compilator and validator tests of dragonegg pass. However the following
validator tests fail and we don't understand why.

    The Validator :: c++/2007-01-06-ELF-Thunk-Sections.cpp
    The Validator :: c/ExternFunctionWeakref.c
    The Validator :: c/ExternVariableWeakref.c
    The Validator :: c/InternFunctionWeakref.c
    The Validator :: c/InternVariableWeakref.c

Since the last four are extremely similar, I give the example of
ExternVariableWeakref.c below:

The test file looks like:

// RUN: %dragonegg -S %s -o - | FileCheck %s
static int variable_weakref __attribute__ ((weakref("bar")));
int *use_variable = &variable_weakref;
// CHECK: @use_variable = unnamed_addr global i32* @bar
// CHECK: @bar = extern_weak global i32

And the output we get (which ideally should match the CHECK sections above)

@use_variable = unnamed_addr global i32* @variable_weakref
@variable_weakref = internal global i32 0

Note that for some reason, it is not creating a weak symbol.

We'd appreciate any suggestions on how these might be fixed or where to
look to figure out what's going on.

Thanks and Regards,
Arun Prabhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151028/a27c990a/attachment.html>

More information about the llvm-dev mailing list