Actually, I think I figured out the problem already: I believe the problem happens in _start, not _start_c, because TinyCC does not recognize the omit-frame-pointer optimization flag, which arch-x86_64.h from nolibc uses to define _start. Wouldn't this be fairly easy to implement?
On Thu, Aug 1, 2024 at 11:51, Jonathan M. Wilbur <jonathan@wilbur.space> wrote:
Adding the assembly by GCC for the same program, for comparison.
On Thu, Aug 1, 2024 at 11:45, Jonathan M. Wilbur <jonathan@wilbur.space> wrote:
Hello,
When TinyCC compiles a program using nolibc's
crt.h, the resulting program always has an argc of 0, but this does not happen with GCC. I simply don't have a grasp on assembly enough to see what is wrong, but I have attached it if somebody could help me interpret it.
Cheers,
- Jonathan M. Wilbur