LLD can not catch a memory area overflow when using a data command.
If we have the script below:
.foo : { *(.foo) BYTE(0x1) } > ram
where BYTE overflows the ram region, we do not report it currently.
Patch fixes that. This change can also be helpful for other places,
I am planning to use it for fixing PR36535.