From: egodust:
My version of tcc_export_binary_image() just *moves* the pointers
inside the state structure into the binary structure, tcc still owns
the memory, thats why *free() is needed, tcc_free() doesn't deep free
and tcc_delete() only works on TCCState objects.
Ah, okay. I thought you
Heyas,
On Sun, Apr 20, 2008 at 7:10 PM, grischka [EMAIL PROTECTED] wrote:
Ah, okay. I thought you wanted to copy all the section data into one
single piece of flat memory, like:
|text--data-bss---|
This to free is plain easy. It is (moderately) more complex to
make,
From: egodust:
1. tcc_new() MUST be matched by a tcc_delete() that share the same
sections, i.e. no mixing of different states, only ONE state is
allowed to exist at a time because of global copies.
No, that does not follow necessarily. It only means that
only one state can have global copies.
Hey,
On Sun, Apr 20, 2008 at 8:50 PM, grischka [EMAIL PROTECTED] wrote:
From: egodust:
1. tcc_new() MUST be matched by a tcc_delete() that share the same
sections, i.e. no mixing of different states, only ONE state is
allowed to exist at a time because of global copies.
No, that does
grischka wrote:
[...]
Well, I need to suggest something. So, maybe I'd move the bits in
tcc_delete, that mess with globals, out from tcc_delete into another
function. Then that function (name it tcc_cleanup) can be called
from tcc_new instead. How is this?
Well, speaking as someone who
From: David Given:
grischka wrote:
[...]
Well, I need to suggest something. So, maybe I'd move the bits in
tcc_delete, that mess with globals, out from tcc_delete into another
function. Then that function (name it tcc_cleanup) can be called
from tcc_new instead. How is this?
From: egodust:
Yes, but then there is a memory leak!, tcc_new() overwrites globals
with section data that tcc_delete() frees, it can only free the 'last
known' section, i.e.
As far as I can see all section data can be reached from the
TCCState itself. For example symtab_section is in the
Heyas all,
First of all, might I suggest some warnings in libtcc.h? It seems to
suggest that you
can allocate as many compiler states with tcc_new() as you want and
none will mess
with each other-- I was in for a shock when I looked at the code and it was
sapping globals left and right! from tcc
From: egodust:
Heyas all,
First of all, might I suggest some warnings in libtcc.h?
Maybe a TODO entry?
I was in for a shock when I looked at the code and it was
sapping globals left and right! from tcc state :(
True.
Be that as it may, I was hoping to use libtcc to compile a set of
C
Heyas,
On Thu, Apr 17, 2008 at 9:16 PM, grischka [EMAIL PROTECTED] wrote:
First of all, might I suggest some warnings in libtcc.h?
Maybe a TODO entry?
:)
I was in for a shock when I looked at the code and it was
sapping globals left and right! from tcc state :(
True.
Be
10 matches
Mail list logo