I tried to link an assembly program with tcc that does not depend on any
shared library and that needs to be compile without -nostdlib. My
compile command was like this:

    #tcc can't preprocess the file
    $ cpp jonesforth.S -o jonesforth.s
    #tcc can't assemble this file since it uses some features of gas
    #that tcc does not provide
    $ as jonesforth.s -o jonesforth.s
    $ tcc jonesforth.o -nostdlib -o jonesforth
    $ file jonesforth
    jonesforth: ELF 32-bit LSB executable, Intel 80386, version 1
    (SYSV), dynamically linked (uses shared libs), not stripped

It is strange that even though jonesforth is linked without any shared
libraries, it is still marked as "dynamically linked". If I look at the
output of objdump, it even tells me there are additional sections for
dynamic linking.

It would be nice if tcc was smart enough to turn of dynamic linking if
-nostdlib and no -l flags are passed.

Yours, Robert Clausecker


_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to