[EMAIL PROTECTED] (Stefan Reinauer) writes:

> Hi there,
> 
> > Additionally i'm still stuck with free_mem_end_ptr sticking to
> > 0x00000000, while free_mem_ptr is 0x04xxxxxx or 0x05xxxxxx depending on
> > which binutils i used (2.11.90.0.29 and 2.11.92.0.10)
> 
> I looked into arch/i386/config/ldscript.base and I noticed, that heap
> is defined thus:
> 
>         .heap . : {
>                 _heap = .;
>                 /* Reserve 256K for the heap */
>                 . = HEAP_SIZE ;
>                 . = ALIGN(4);
>                 _eheap = .;
>         }
> 
> In the Alpha linker script, this looks similar:
> 
>         .heap : {
>                 _heap = .;                      
>                 /* Reserve a 128K for the heap */
>                 . = . + 128*1024;
>                 . = ALIGN(8);
>                 _eheap = .;
>         }
> 
> Should . = HEAP_SIZE ; not be  . = . + HEAP_SIZE ? high heap address
> would otherwise be set to HEAP_SIZE instead of _heap + HEAP_SIZE, which
> might be the reason, newer binutils do not produce working images.

One of the confusing and potentially useful things about linker
scripts is that withint a section definition address are relative to
that section. 

So a the start of a linker section.  An absolute address assignment.
. = HEAP_SIZE

Means exactly the same as a relative address increment.
. = . + HEAP_SIZE

In the last round of messing with this I used the first form explictly
as a reminder that linker address are relative to their section.

> I'll try it as soon as I'm near the geode.

I'll be interested to hear the results.


> 
> Best regards,
>   Stefan Reinauer
>   
> -- 
> Ok hex 4666 dup negate do i 4000 dup 2* negate do " *" 0 dup 2dup 1e 0 do
>  2swap * e >>a 2* 5 pick + -rot - j + dup dup * e >>a rot dup dup * e >>a 
>   rot swap 2dup + 10000 > if 3drop 3drop "  " 0 dup 2dup leave then loop 
>               2drop 2drop type 268 +loop cr drop 5de +loop

Could you perhaps put a factored for of this in your sig.  That is a
very nasty for expression.  Usually I promote forth as readable
because you have to write readable code to be able to keep track of
what is on the stack.  But that expression tends to blow that
argument out of the water...

Eric


Reply via email to