BartmanAbyss / vscode-amiga-debug

One-stop Visual Studio Code Extension to compile, debug and profile Amiga C/C++ programs compiled by the bundled gcc 12.2 with the bundled WinUAE/FS-UAE.
GNU General Public License v3.0
312 stars 39 forks source link

How do I add lz4_fastest.asm to sample project #144

Closed rjobling closed 1 year ago

rjobling commented 1 year ago

I'd like to test using Leonard's LZ4 depack code.

I thought with the new vasm support it'd be easy enough but I've run into a problem I don't understand.

Firstly in order to link I needed to change the main label so it has a double colon "lz4_depack::" that exposes the symbol.

But now I have an elf2hunk error:

Compiling main.c Linking out/a.elf Elf2Hunk out/a.exe [ELF2HUNK] Unrecognized relocation type 187 2, [ELF2HUNK] for symbol '' out/a.elf: Invalid argument gnumake: *** [Makefile:46: out/a.exe] Error 1

Any ideas?

Leonard's code is here: https://github.com/arnaud-carre/lz4-68k

rjobling commented 1 year ago

I gave up on trying to compile this as a .asm file and just converted the lib to a .s file and that worked for me.

I suspect that the vasm support doesn't play nice with cpp files and therefore c++?

BartmanAbyss commented 1 year ago

I don't know. I can't think of a simple reason. But I haven't used vasm, https://github.com/davidcanadas implemented the support for it.

rjobling commented 1 year ago

.s version is fine for my purposes