How does ld test inequality for assignment from dot?

0

I have an ASSERT in my linker file which looks like this:

ASSERT(_limit <= HL_LIMIT, "error: _limit > HL_LIMIT");

_limit is defined above as:

_limit = .;

In the .map file, these are resolving as:

*fill*          0x0001f3f5        0xb 
                0x0001f400                _etext = .
                0x0001f400                _limit = .

...

0x00000001                ASSERT ((_limit <= 0x1f400), error: _limit > HL_LIMIT)

So it looks like _limit is being assigned to 0x1f400 and is equal to HL_LIMIT, but the ASSERT is failing. Does assignment from the dot have any special assumptions associated with it?

ld
asked on Stack Overflow Feb 10, 2020 by abroekhof

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0