[M3devel] bind_segment vs. declare_segment?
Jay K
jay.krell at cornell.edu
Fri Nov 19 18:08:14 CET 2010
Another option would be that every time we get an offset load against it,
see if it is beyond the current size, in which case grow the size and relayout.
That could end up relayout many times.
Besides accessing beyond its size, the problem, for configure -enable-checking,
is that we later completely replace the type, so returning its address from
the module initializer ends up a different type than the actual data.
- Jay
From: jay.krell at cornell.edu
To: hosking at cs.purdue.edu
Date: Fri, 19 Nov 2010 16:24:57 +0000
CC: m3devel at elegosoft.com
Subject: Re: [M3devel] bind_segment vs. declare_segment?
ok, well I got it to work. Using the new ability to loop over the data multiple
times easily in the backend. Though the frontend or middle end could make the transform,
if all backends want the data in a better order.
- Jay
From: hosking at cs.purdue.edu
Date: Fri, 19 Nov 2010 09:43:03 -0500
To: jay.krell at cornell.edu
CC: m3devel at elegosoft.com
Subject: Re: [M3devel] bind_segment vs. declare_segment?
declare_segment doesn't have the size because it is unknown at the time of the declaration, which comes before the module is compiled.Only as the module is compiled does the size become known, with Bind_segment emitted at the end.
On Nov 19, 2010, at 5:01 AM, Jay K wrote:I'm not looking at m3front. I should.
Why does declare_segment not have the size?
I'm going to just live with whatever the frontend does for now.
Make an extra pass to find the bind_segments, so that when
I do things "for real", declare_segment can set the size correctly.
Later I'll do better -- making the segment contain fields.
So that globals become debuggable, in stock gdb (as big records).
But first I want configure enable-checking to work.
(with one exception, the static link stuff..)
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101119/77653cd8/attachment-0002.html>
More information about the M3devel
mailing list