[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] some symbole are defined twice when we call tcc_reloc
Re: [Tinycc-devel] some symbole are defined twice when we call tcc_relocate twice
Sun, 29 Jan 2017 12:53:46 +0100
Thunderbird 126.96.36.199 (Windows/20090812)
uso ewin wrote:
When I've try to call successively tcc_compile_string, tcc_relocate,
Simply, such usage currently is not part of the concept. As it
is, tcc_relocate must be called only once for each TCCState.
I don't see right now why you would want that.
In principle it could be enabled, but there are some complications.
For example symbols need to be converted to SHN_ABS, old code needs
to be deleted, ...
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:
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 mailing list