diff options
| author | Michael Matz <matz@suse.de> | 2017-11-27 04:03:03 +0100 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2017-11-27 04:59:29 +0100 |
| commit | 9e0d23cc47359149a39eafffdbb133963980b6ed (patch) | |
| tree | 84ca4bd202768b2c71d3ed4f09abcd3e1a729e7d /tests | |
| parent | 3494e5de3a03d021845666f55340d35af44e3bfc (diff) | |
| download | tinycc-9e0d23cc47359149a39eafffdbb133963980b6ed.tar.gz tinycc-9e0d23cc47359149a39eafffdbb133963980b6ed.tar.bz2 | |
tccasm: Unify C and asm symbol table
This makes the asm symbols use the same members as the C symbols
for global decls, e.g. using the ELF symbol to hold offset and
section. That allows us to use only one symbol table for C and
asm symbols and to get rid of hacks to synch between them.
We still need some special handling for symbols that come purely
from asm sources.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/asm-c-connect-1.c | 7 | ||||
| -rw-r--r-- | tests/asm-c-connect-2.c | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/asm-c-connect-1.c b/tests/asm-c-connect-1.c index fbd240c..c3dcf2b 100644 --- a/tests/asm-c-connect-1.c +++ b/tests/asm-c-connect-1.c @@ -14,11 +14,13 @@ static int x1_c(void) asm(".text;"_"x1: call "_"x1_c; ret"); +void callx4(void); int main(int argc, char *argv[]) { asm("call "_"x1"); asm("call "_"x2"); asm("call "_"x3"); + callx4(); return 0; } @@ -30,3 +32,8 @@ int x2(void) } extern int x3(void); + +void x4(void) +{ + printf("x4\n"); +} diff --git a/tests/asm-c-connect-2.c b/tests/asm-c-connect-2.c index 3a8cff2..7ab9dc3 100644 --- a/tests/asm-c-connect-2.c +++ b/tests/asm-c-connect-2.c @@ -5,3 +5,6 @@ int x3(void) printf("x3\n"); return 3; } + +void callx4(void); +__asm__("callx4: call x4; ret"); |
