08 July 2018, 20:56 | #1 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Problem with VASM - file is not an object module on A500, ok on A1200???
I have a really odd problem that I haven't been able to get fixed after a few hours banging my head and I'm hoping someone could give some insight.
I have a source file which compiles fine, if I run it on a WinUAE A1200 config it runs fine, if I run it with A500 config I get an error "file is not an object module from workbench". I can only imagine it's something to do with Vasm flags. vasm -Fhunkexe -I C:\Development\Scroller\Include -o C:\Emulators\Commodore\Amiga\HardDrive\A500_TestRig\ToolChain\test.exe C:\Development\Scroller\main.asm Can anyone shed any light? I didn't seem to have this problem when I was compiling Bomb Jack... very odd. Cheers, Geezer |
08 July 2018, 21:20 | #2 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,421
|
Quote:
The first thing that springs to my mind is that some hunk types are not compatible with Kickstart 1.3. If you use BSS or similar sections this might cause trouble. I usually use: vasm -kick1hunks -Fhunk That should force Kickstart 1.3 compatible hunks. Edit: -Fhunk is for further linking, so it should be -Fhunkexe in your case. |
|
08 July 2018, 21:25 | #3 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
I have no idea why I did not run into that when making Bomb Jack... really really weird. If I post the source would we be able to understand why? |
|
08 July 2018, 21:29 | #4 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,421
|
Well, maybe - I'm not actually an expert on object files. Never looked into how that works t.b.h.
The VASM manual says that some types of relocation don't work under KS 1.3, but I don't know when these are created (as in, I do understand when relocations are created, just not why the linker would choose one type over another). Perhaps it'll shed some light on the matter? Quote:
|
|
09 July 2018, 08:27 | #5 |
Registered User
Join Date: Nov 2016
Location: DE
Posts: 20
|
Look at the binary, does it start with $03f3 ? That is the header block id for executables (load files), whereas $03e7 is the header block id for linkable files. I would be really surprised if the loader on KS 1.3 accepted anything but the former.
EDIT: disregard - I mis-read roondar's reply and thought the problem was with -Fhunkexe. Last edited by hmn; 09 July 2018 at 18:09. |
09 July 2018, 13:04 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,502
|
When the program still assembles without error using -kick1hunks, then it cannot be an OS2+ specific relocation which was in use. So I am quite sure that the first executable just contained a HUNK_RELOC32SHORT hunk with 16-bit offsets for relocations, which is unknown to Kickstart 1.x, and which is the default without -kick1hunks (because it saves much space).
That the problem didn't appear with Bomb Jack might have several reasons. Maybe the sections offsets were too big for HUNK_RELOC32SHORT, or there were too many, or none at all? Or you linked the final executable from multiple object files with a different linker or different options? |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Vasm file type for cubicide? | tolkien | Coders. General | 5 | 10 August 2017 11:54 |
A1200 RF module removal pics + A1200 chips overview | eXeler0 | Hardware pics | 2 | 08 March 2017 00:09 |
Programs created by vasm don't run on vanilla A500 | Knocker | Coders. Asm / Hardware | 12 | 30 July 2016 12:00 |
...file is not an object module | Vaninna | support.Apps | 8 | 11 March 2015 11:53 |
Help linking VASM object code | clenched | Coders. Asm / Hardware | 2 | 24 May 2013 22:32 |
|
|