adtools / amigaos-cross-toolchain

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

binutils-2.26: rewrite of AmigaHunk support for BFD #25

Open cahirwpz opened 8 years ago

cahirwpz commented 8 years ago

AmigaHunk support for binutils hadn't been ever finished by it's previous maintainers. Current feature set of GNU binutils is limited - the tools:

To make things worse, current AmigaHunk support for BFD:

Without more recent version of GNU as and GNU ld there's little sense in updating gcc (which switched to Motorola assembly syntax in later versions) and libnix (because it is missing support for C99 and C11). Also GNU gdb relies heavily on BFD support. Thus I find rewrite AmigaHunk support for BFD necessary to make any progress with whole toolchain as such.

AmigaHunk format is comprehensively described in:

I implemented Python tools to read a.out format and AmigaHunk format. One could use them for reference as well.

GNU binutils are described in several documents:

cahirwpz commented 8 years ago

This is meta-issue that tries to capture the scope of work. If you'd like to work on it, please drop me a private message!

In my opinion work should start with BFD implementation, then move to porting bits and pieces from current AmigaOS enabled GNU as and GNU ld.

  1. Read support with objdump for AmigaHunk object file, load file and library file.
  2. Archive creation and extraction with GNU ar.
  3. Port changes to GNU ld.
  4. Port changes to GNU as.

Test files could be taken from AmigaOS NDK 3.9, AmigaOS 3.x and SAS/C 6.58.