rework leading underscores
commit6a4f3cf127e6d70a7699c6f0094dab6fd299a3e8
authorgrischka <grischka>
Sat, 27 Jun 2020 15:15:06 +0000 (27 17:15 +0200)
committergrischka <grischka>
Mon, 6 Jul 2020 11:00:47 +0000 (6 13:00 +0200)
tree570d578098abe09d47a581f89d8f49eba8c856f5
parent72277967ffa11ca786c3a93c6de4076040a2d60a
rework leading underscores

tested on win32/64 to pass the tests when enabled

- libtcc.c :
  let tcc define __leading_underscore if enabled
  tcc_add_symbol() : add _ automatically
- tccelf.c : remove tcc_get_symbol_err(), find_c_sym()
  currently symbol length is limited to 256 in several
  places, so we can use a fixed local buffer for now as well.
- win32/lib/crtinit.c : new file for init/fini
- lib/*.S, tests7* : use __leading_underscore
- bt-log.c: this file wont work relibaly if compiled with gcc
23 files changed:
lib/alloca86-bt.S
lib/alloca86.S
lib/alloca86_64-bt.S
lib/alloca86_64.S
lib/bt-dll.c
lib/bt-log.c
libtcc.c
tcc.h
tccelf.c
tccmacho.c
tccpe.c
tccrun.c
tests/asm-c-connect-1.c
tests/asm-c-connect-2.c
tests/tests2/85_asm-outside-function.c
tests/tests2/98_al_ax_extend.c
tests/tests2/99_fastcall.c
win32/lib/chkstk.S
win32/lib/crt1.c
win32/lib/crtinit.c [new file with mode: 0644]
win32/lib/dllcrt1.c
win32/lib/wincrt1.c
x86_64-link.c