[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] some symbole are defined twice when we call tcc_relocate
From: |
uso ewin |
Subject: |
[Tinycc-devel] some symbole are defined twice when we call tcc_relocate twice |
Date: |
Fri, 27 Jan 2017 11:04:11 +0100 |
When I've try to call successively tcc_compile_string, tcc_relocate,
tcc_compile_string, tcc_relocate
tcc give me these errors:
tcc: error: '_etext' defined twice
tcc: error: '_edata' defined twice
tcc: error: '__preinit_array_start' defined twice
tcc: error: '__preinit_array_end' defined twice
tcc: error: '__init_array_start' defined twice
tcc: error: '__init_array_end' defined twice
tcc: error: '__fini_array_start' defined twice
tcc: error: '__fini_array_end' defined twice
I guess tcc try to add some libraries at the begin of our "object"
during the reallocation,
but if we call tcc_relocate twice, then tcc try to add these libraries
twice, which make some
symbols define twice.
I've made a patch to fix it for me:
https://github.com/cosmo-ray/tcc/commit/36266c0e619cc1e425c4fad4337f1877148f58bc
As it's the first time I touch to tcc code, and touch a compiler code
I'm not sure I didn't break anything, does this patch look good to you ?
Should I push it directly to mob ?
- [Tinycc-devel] some symbole are defined twice when we call tcc_relocate twice,
uso ewin <=