This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lost DATA space

for this:

IDATA 0010H 000CH UNIT ?ID?SMAIN
001CH 0004H *** GAP ***
....
DATA 0056H 0022H UNIT ?DT?SMAIN
IDATA 0078H 0001H UNIT ?STACK

I am losing 16 bytes of the precious commodity DATA storage. Does anyone know of a way to get DATA in the 10-1f slot?. (I have enough globals, that I can use it for globals if that makes it doable).

cross posted on 8052

Erik

Parents

  • What it looks like is that the DATA is somehow in "segments" and the linker refuses to put any DATA in the 10-1f if it does not have a "DATA segment" small enough.


    Exactly. Each .c file produces its own segment of code and segment of global data. (One segment for each memory type, actually, and you also get segments for the function locals/temps.) The linker cannot split up those segments into pieces; the segment is the smallest chunk with which it can work. It doesn't locate individual variables any more than it does individual functions. To break up a segment, you have to break up the C source into separate .c files.

    (I usually run into this problem more often with functions than with data, but I imagine the same restriction applies.)

    These map files are the result of a failed link, right? In that case, the linker might not have allocated that early idata segment early. It might have done so after all the data was located (or couldn't fit), and then put it in the first hole it could find.

Reply

  • What it looks like is that the DATA is somehow in "segments" and the linker refuses to put any DATA in the 10-1f if it does not have a "DATA segment" small enough.


    Exactly. Each .c file produces its own segment of code and segment of global data. (One segment for each memory type, actually, and you also get segments for the function locals/temps.) The linker cannot split up those segments into pieces; the segment is the smallest chunk with which it can work. It doesn't locate individual variables any more than it does individual functions. To break up a segment, you have to break up the C source into separate .c files.

    (I usually run into this problem more often with functions than with data, but I imagine the same restriction applies.)

    These map files are the result of a failed link, right? In that case, the linker might not have allocated that early idata segment early. It might have done so after all the data was located (or couldn't fit), and then put it in the first hole it could find.

Children
No data