tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] [BUG] The main function parameter is missing.


From: HarukaMomono
Subject: [Tinycc-devel] [BUG] The main function parameter is missing.
Date: Thu, 6 Jun 2024 17:12:35 +0800

commit:3b943bec5de423e234b5f92d9a8f110ad66a85a1
author:Gynt <Gynt@users.noreply.github.com>
           Mon, 3 Jun 2024 19:52:34 +0800 (3 13:52 +0200)
committer:Gynt <Gynt@users.noreply.github.com>
                Mon, 3 Jun 2024 19:56:32 +0800 (3 13:56 +0200)
tree:3c7fd4f944e9417b6bf2c95c21c9e8c9ee671b11
parent:8cd21e91ccee3baf15ad2f8cba9cbc4b618695a0

envs: windows 10; gcc version 14.1.0 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r1)

In this branch, I built it using gcc, the build command: build-tcc.bat -x

C file:
#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char **argv, const char **envp) {
printf("argc = %d\n", argc);
system("pause");
return 0;
}

Compile Commands:
tcc.exe -std=c11 -m32 -o test.exe test.c

result:
argc = 9908136

Decompile using IDA:
int __thiscall sub_401000(void *this)
{
  printf("arg num = %d\n", this);
  system("pause");
  return 0;
}

There are missing parameters.


??????
antisnow@qq.com
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]