adtools / amigaos-cross-toolchain

AmigaOS cross compiler for Linux / MacOSX / Windows
184 stars 48 forks source link

bfd does not recognize amiga hunk format anymore #43

Closed sezero closed 8 years ago

sezero commented 8 years ago

strip seems to be broken with the latest git checkouts:

$ m68k-amigaos-strip -S hello-stdio m68k-amigaos-strip: hello-stdio: File format not recognized

cahirwpz commented 8 years ago

That's interesting. Could you help me and spend some time debugging this issue? I'm working on #32 now. I'd start the program with gdb and set a breakpoint at https://github.com/cahirwpz/amigaos-binutils-2.9.1/blob/master/bfd/amigaos.c#L262 This routine checks if a file is in amiga hunk format.

ptesavol commented 8 years ago

I can confirm that bfd does not seem to be able to recognize amiga hunk format anymore. It seems that amigaos.c changed a lot when binutils was moved to its own repository and patching was cancelled. Have a look at amigaos.c from the old patch: https://github.com/cahirwpz/amigaos-cross-toolchain/blob/7b237d9d6bd1a16ff508f5a8695ca94318a15751/patches/binutils-2.9.1/bfd/amigaos.c#L153 and compare with the same file from the separate binutils repository: https://github.com/cahirwpz/amigaos-binutils-2.9.1/blob/master/bfd/amigaos.c#L153. After line 153 in amigaos.c of the patch there are definitions of macros such as GL() GW() and LONGSIZE(), and these macros are not found in amigaos.c of the separate binutils repository. Maybe these macros are needed for amigaos.c to work on 64-bit machines?

blubberdiblub commented 8 years ago

The issue could be renamed to something like "binutils don't read Amiga hunk format anymore (breaks strip and other tools)" to make it easier to relate to. If I hadn't known that it is effectively the same issue (I was trying to use objdump and size here), I would likely have reported a new one.