Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

trip report: Tiny C Compiler 0.9.27 (Miscellaneous)

posted by bencollver Homepage, 04.02.2026, 21:38

> p.s. I could probably work around this first issue by using TCC's @file
> syntax for the overlong command line options.

I verified that i can use TCC's @file syntax to work around this issue on SvarDOS.

Taking a cue from tkchia, i disassembled the hex bytes from the second error message, and this time i found the hex bytes in TCC using mingw's objdump command.

C:\TCC0927>objdump -D libtcc.o
...
00009c51: <__sym_malloc>:
...
    9ce4:       89 08                   mov %ecx,(%eax)
    9ce6:       8b 85 f8 ff ff ff       mov -0x8(%ebp),%eax
    9cec:       89 85 f4 ff ff ff       mov %eax,-0xc(%ebp)


I found __sym_malloc() in tccgen.c

static Sym *__sym_malloc(void)
{
    Sym *sym_pool, *sym, *last_sym;
    int i;

    sym_pool = tcc_malloc(SYM_POOL_NB * sizeof(Sym));
    dynarray_add(&sym_pools, &nb_sym_pools, sym_pool);

    last_sym = sym_free_first;
    sym = sym_pool;
    for(i = 0; i < SYM_POOL_NB; i++) {
        sym->next = last_sym;
        last_sym = sym;
        sym++;
    }
    sym_free_first = last_sym;
    return last_sym;
}


I believe the disassembly corresponds to the for(;;) loop body, probably at "sym->next = last_sym". I am not sure i am ready to debug this one.

 

Complete thread:

Back to the forum
Board view  Mix view
23154 Postings in 2179 Threads, 404 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum