Skip to content

gcc anonymous globals relocation failure #53

Open
@Hexlord

Description

@Hexlord

It seems that gcc, unlike clang, does not export symbols from anonymous namespaces with -Wl,-export-dynamic, or does it in a way that jet-live does not recognize

namespace {
struct MyStruct {
    int my_field = 0;
};
MyStruct global;
}

global.my_field = 123;
// hot-reload of this module happens
assert(global.my_field == 123); // fails (seems to be filled with zeroes/default initialized).

Would love to investigate what causes this, but there are no jet-live logs coming out related to this, so any pointers are appreciated!

Upd.: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31462 seems to be the old change in gcc that caused this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions