diff --git a/bolt/test/AArch64/double_jump.cpp b/bolt/test/AArch64/double_jump.cpp --- a/bolt/test/AArch64/double_jump.cpp +++ b/bolt/test/AArch64/double_jump.cpp @@ -52,4 +52,4 @@ return count; } -int main(int argc, const char *argv[]) { return foo(38); } +extern "C" int _start() { return foo(38); } diff --git a/bolt/test/AArch64/lit.local.cfg b/bolt/test/AArch64/lit.local.cfg --- a/bolt/test/AArch64/lit.local.cfg +++ b/bolt/test/AArch64/lit.local.cfg @@ -1,2 +1,7 @@ if config.host_arch not in ['aarch64']: config.unsupported = True + +config.substitutions.insert( + 0, ('%cflags', + '%cflags --target=aarch64-pc-linux -nostartfiles -nostdlib -fuse-ld=lld' + ' -Wl,--unresolved-symbols=ignore-all')) diff --git a/bolt/test/AArch64/tailcall_traps.s b/bolt/test/AArch64/tailcall_traps.s --- a/bolt/test/AArch64/tailcall_traps.s +++ b/bolt/test/AArch64/tailcall_traps.s @@ -17,12 +17,12 @@ .text .align 4 - .global main - .type main, %function -main: + .global _start + .type _start, %function +_start: nop ret - .size main, .-main + .size _start, .-_start .global foo .type foo, %function