mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 12:34:45 +00:00
tccrun: 'tcc_relocate()' twice no longer supported
- abort with notice when tcc_relocate() is called with the
former two-step method
- support backtrace & bcheck not only with tcc_run() but also
for directly called functions from tcc_get_symbol(); enable
witn 'tcc_set_options("-bt/-b");'
- move struct rt_context and debug sections into compiled code
for TCC_OUTPUT_MEMORY also
- protect access (g_rc) with semaphore
Also:
- add armv7/aarch4/riscv64 github tests (qemu emulated)
- win32/build-tcc.bat: build cross compiler only with -x
This commit is contained in:
7
tccdbg.c
7
tccdbg.c
@@ -416,12 +416,15 @@ ST_FUNC void tcc_debug_new(TCCState *s1)
|
||||
int shf = 0;
|
||||
if (!s1->dState)
|
||||
s1->dState = tcc_mallocz(sizeof *s1->dState);
|
||||
|
||||
#ifdef CONFIG_TCC_BACKTRACE
|
||||
/* include stab info with standalone backtrace support */
|
||||
if (s1->do_backtrace
|
||||
&& (s1->output_type & (TCC_OUTPUT_EXE | TCC_OUTPUT_DLL)))
|
||||
if (s1->do_debug && s1->output_type == TCC_OUTPUT_MEMORY)
|
||||
s1->do_backtrace = 1;
|
||||
if (s1->do_backtrace)
|
||||
shf = SHF_ALLOC | SHF_WRITE; // SHF_WRITE needed for musl/SELINUX
|
||||
#endif
|
||||
|
||||
if (s1->dwarf) {
|
||||
s1->dwlo = s1->nb_sections;
|
||||
dwarf_info_section =
|
||||
|
||||
Reference in New Issue
Block a user