{"action":"opened","issue":{"url":"https://api.github.com/repos/cahirwpz/amigaos-cross-toolchain/issues/25","repository_url":"https://api.github.com/repos/cahirwpz/amigaos-cross-toolchain","labels_url":"https://api.github.com/repos/cahirwpz/amigaos-cross-toolchain/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/cahirwpz/amigaos-cross-toolchain/issues/25/comments","events_url":"https://api.github.com/repos/cahirwpz/amigaos-cross-toolchain/issues/25/events","html_url":"https://github.com/cahirwpz/amigaos-cross-toolchain/issues/25","id":133955958,"number":25,"title":"binutils-2.26: rewrite of AmigaHunk support for BFD","user":{"login":"cahirwpz","id":265236,"avatar_url":"https://avatars.githubusercontent.com/u/265236?v=3","gravatar_id":"","url":"https://api.github.com/users/cahirwpz","html_url":"https://github.com/cahirwpz","followers_url":"https://api.github.com/users/cahirwpz/followers","following_url":"https://api.github.com/users/cahirwpz/following{/other_user}","gists_url":"https://api.github.com/users/cahirwpz/gists{/gist_id}","starred_url":"https://api.github.com/users/cahirwpz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahirwpz/subscriptions","organizations_url":"https://api.github.com/users/cahirwpz/orgs","repos_url":"https://api.github.com/users/cahirwpz/repos","events_url":"https://api.github.com/users/cahirwpz/events{/privacy}","received_events_url":"https://api.github.com/users/cahirwpz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-16T11:30:05Z","updated_at":"2016-02-16T11:30:05Z","closed_at":null,"body":"AmigaHunk support for binutils hadn't been ever finished by it's previous maintainers. Current feature set of _GNU binutils_ is limited - the tools:\r\n\r\n* don't use `AmigaHunk` format for object files,\r\n* use AT&T assembly syntax instead of Motorola syntax,\r\n* data / bss chip sections cannot be represented in modified `a.out` format,\r\n* cannot create `AmigaHunk` link libraries,\r\n* ... and other less used features are probably missing.\r\n\r\nTo make things worse, current `AmigaHunk` support for BFD:\r\n\r\n* crashes time to time without good reason, \r\n* cannot be compiled on 64-bit architecture due to protability issues,\r\n* is written in a way that makes it extremely difficult to update it to more recent versions of binutils.\r\n\r\nWithout 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.**\r\n\r\nAmigaHunk format is comprehensively described in:\r\n\r\n* _The Amiga Guru Book_, chapter 22\r\n* _The AmigaDOS Manual_ (3rd edition), chapter 10\r\n\r\nI implemented Python tools to read [a.out](https://github.com/cahirwpz/amigaos-cross-toolchain/blob/master/tools/dumpaout.py) format and [AmigaHunk](https://github.com/cahirwpz/amigaos-cross-toolchain/blob/master/tools/dumphunks.py) format. One could use them for reference as well.\r\n\r\n`GNU binutils` and BFD is described in several documents:\r\n\r\n* [Binutils Porting Guide To A New Target Architecture](https://sourceware.org/binutils/binutils-porting-guide.txt)\r\n* `bfd/doc/bfd.pdf`, `bfd/doc/bfdint.pdf` - available after invoking `make pdf` in binutils source tree."}}