mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
d76e03232b
- x86_64-link.c: ignore relocation overflow to undefined (weak) symbols - 104_inline.test: test lower 32 bits only - tccpe.c: support -Wl,--image-base=... above the 32bit range
55 lines
1.6 KiB
C
55 lines
1.6 KiB
C
|
|
#define GOT(f) \
|
|
__attribute__((weak)) void f(void); \
|
|
printf("%d %s\n", !!((__SIZE_TYPE__)f & ~0u), #f);
|
|
|
|
int printf(const char*, ...);
|
|
|
|
void check_exports()
|
|
{
|
|
// 0
|
|
GOT(inline_inline_2decl_only)
|
|
GOT(inline_inline_undeclared)
|
|
GOT(inline_inline_predeclared)
|
|
GOT(inline_inline_postdeclared)
|
|
GOT(inline_inline_prepostdeclared)
|
|
GOT(inline_inline_undeclared2)
|
|
GOT(inline_inline_predeclared2)
|
|
GOT(inline_inline_postdeclared2)
|
|
GOT(inline_inline_prepostdeclared2)
|
|
|
|
// 1
|
|
GOT(extern_extern_postdeclared)
|
|
GOT(extern_extern_postdeclared2)
|
|
GOT(extern_extern_predeclared)
|
|
GOT(extern_extern_predeclared2)
|
|
GOT(extern_extern_prepostdeclared)
|
|
GOT(extern_extern_prepostdeclared2)
|
|
GOT(extern_extern_undeclared)
|
|
GOT(extern_extern_undeclared2)
|
|
GOT(extern_postdeclared)
|
|
GOT(extern_postdeclared2)
|
|
GOT(extern_predeclared)
|
|
GOT(extern_predeclared2)
|
|
GOT(extern_prepostdeclared)
|
|
GOT(extern_undeclared)
|
|
GOT(extern_undeclared2)
|
|
GOT(inst2_extern_inline_postdeclared)
|
|
GOT(inst2_extern_inline_predeclared)
|
|
GOT(inst3_extern_inline_predeclared)
|
|
GOT(inst_extern_inline_postdeclared)
|
|
GOT(inst_extern_inline_predeclared)
|
|
GOT(main)
|
|
GOT(noinst_extern_inline_func)
|
|
GOT(noinst_extern_inline_postdeclared)
|
|
GOT(noinst_extern_inline_postdeclared2)
|
|
GOT(noinst_extern_inline_undeclared)
|
|
|
|
// 0
|
|
GOT(noinst_static_inline_postdeclared)
|
|
GOT(noinst2_static_inline_postdeclared)
|
|
GOT(noinst_static_inline_predeclared)
|
|
GOT(noinst2_static_inline_predeclared)
|
|
GOT(static_func)
|
|
}
|