Closed dafyddcrosby closed 4 years ago
I'll try to reproduce this locally. I'm using vasm 1.7c without any issue, although I'm not sure why the compiler version would matter here. Changing beq.s/bne.s to beq.w/bne.w fixes branch destination out of range errors.
I was able to build with 1.7c without issue as well, so does appear to be vasm-related
vasm 1.7c (c) in 2002-2015 Volker Barthelmann
vasm M68k/CPU32/ColdFire cpu backend 2.0f (c) 2002-2015 Frank Wille
vasm motorola syntax module 3.8 (c) 2002-2015 Frank Wille
vasm binary output module 1.8 (c) 2002-2009,2013,2015 Volker Barthelmann
CODE(acrx2): 121216 bytes
seg7a120(acrwx4): 469212 bytes
seg1fe793(acrwx1): 6253 bytes
seg200000(acrwx1): 1 byte
I see that the M68k/CPU32/ColdFire cpu backend was updated as well - I will look into what changed that might be causing this. In the meantime changing .s to .w would fix this - and will likely be what I do to fix it anyway.
OK, I found a ton of other problems after getting those errors to clear so it'll be a few days before I sort it all out.
OK, fixed for real. I believe the VASM change called "Reworked absolute ORG sections" is the culprit.
Last comment for real this time... after comparing syntax/mot/syntax.c in vasm 1.7 and 1.8 I figured out what changed in org handling. I'm not an expert on vasm internals but it appears the handle_org in 1.8 was changed in a way that causes it to ignore the first org statement it hits. This led to a ton of broken references in the code.
Thanks for the guide and the source! I'm using it to help along my own little Genesis project :-) Seeing this issue on both macOS and Linux with the latest stable vasm (v1.8h)