android_mt6572_jiabo/ndk/tests/device/issue28598-linker-global-ref/jni/main.cpp
2025-09-05 16:56:03 +08:00

10 lines
251 B
C++

#include <cstdio>
#include "liba.h"
int *global_ptr = &global; // Without this line, everything is fine
int main()
{
func();
printf("global = 0x%x (%p)%s\n", global, &global, ((global != 0x42)? ", ERROR!!!":""));
return global != 0x42;
}