From cc6cb7f0e294f0c98c4970c7ec993709fc2daa1a Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 4 Dec 2017 03:51:14 +0100 Subject: Fix another corner case with C/asm symtable See testcase (from grischka). If the asm has no .globl, but there's a (non-static) C definition the symbol should be exported, even if the first reference comes from asm. --- tests/asm-c-connect-1.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/asm-c-connect-1.c') diff --git a/tests/asm-c-connect-1.c b/tests/asm-c-connect-1.c index c3dcf2b..1849b56 100644 --- a/tests/asm-c-connect-1.c +++ b/tests/asm-c-connect-1.c @@ -15,12 +15,15 @@ static int x1_c(void) asm(".text;"_"x1: call "_"x1_c; ret"); void callx4(void); +void callx5_again(void); int main(int argc, char *argv[]) { asm("call "_"x1"); asm("call "_"x2"); asm("call "_"x3"); callx4(); + asm("call "_"x5"); + callx5_again(); return 0; } @@ -37,3 +40,9 @@ void x4(void) { printf("x4\n"); } + +void x5(void); +void x5(void) +{ + printf("x5\n"); +} -- cgit v1.3.1