Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cahirwpz opened this issue Feb 16, 2016 · 1 comment
Open

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

cahirwpz opened this issue Feb 16, 2016 · 1 comment
Labels

Comments

@cahirwpz
Copy link
Member

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

  • don't use AmigaHunk format for object files,
  • use AT&T assembly syntax instead of Motorola syntax,
  • data / bss chip sections cannot be represented in modified a.out format,
  • cannot create AmigaHunk link libraries,
  • ... and other less used features are probably missing.

To make things worse, current AmigaHunk support for BFD:

  • crashes time to time without good reason,
  • cannot be compiled on 64-bit architecture due to protability issues,
  • is written in a way that makes it extremely difficult to update it to more recent versions of binutils.

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:

  • The Amiga Guru Book, chapter 22
  • The AmigaDOS Manual (3rd edition), chapter 10

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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant