The case I found:
SECTION LOADER
jr pietro_loader
SECTION LOADER_CODE
pietro_loader:
This assembled the jr as "jr $fe" which simply loops back on itself, causing an infinite loop. It's happening because the jr displacement is being calculated at assemble time so that the addresses being used to compute distance are not physical but offsets within their current sections. So at assemble time "pietro_loader" is at an offset of 0 within section "LOADER_CODE" and it so happened that the "jr pietro_loader" was also located at offset 0 within section "LOADER" and the computed displacement was 0 for the jr.
The result was the program was stuck in an infinite loop. A change to "jp pietro_loader"fixed it.
I'd recommend making relative jumps (jr or djnz) to different sections an error. It's a logical error first of all but second allowing this means the linker would have to be modified to patch single byte displacements which, among other things, will break the runtime relocation feature we have going with --reloc-info. That depends on adjustments being 16-bit.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot