Simon Josefsson <jas(a)pdc.kth.se> writes:
Perhaps I should start by seeing what problems there might be
compiling it with gcc then? :-) I'll do that now.
This is Max Matveev describing the invariant his code is expecting.
Does that hold when compiling with gcc?
1999-12-28 Max Matveev <max(a)melbourne.sgi.com>
* unexelfsgi.c (unexec): Change the way we decide which segment
should be extended.
Assumption that .bss section should be outside the PT_LOADable
segment. On IRIX with version 6.2 and above, .bss (or .sbss, if
it's present) is inside the 'data' segment. This would fail the
test which was used to find a segment to grow and cover new
heap. Instead of this assumption, I created another one - on IRIX
the segment to grow should start below .bss and it's address
should extent above the end of .bss. Once this segment is
identified, it's grown to accommodate the new heap and new
zero-length .bss section is added at the end of .data2.