Repository navigation
Build with a binutils 2.46 toolchain (AmigaDev 16.2-rc14) - #205
Merged
Merged
Conversation
The trap stub names ami_crash_saved_* and ami_crash_bailout in asm text,
which the compiler does not parse, so -flto made them local and the
stub's relocations pointed at the plugin's empty placeholder. binutils
2.46 refuses that link ("defined in LTO IR but was made local by the
compiler"); 2.39 accepted it and the stores went to hunk 0. `used' kept
the symbols alive but not global; externally_visible does both.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
binutils 2.46's objdump prints `move.l d0,-316(a5)' as `movel d0,a5@(-316)'. The checker dropped the `@(...)' and read the remaining `a5' as the destination register, failing NetShutdown on a plain store into its frame. Only `a5@-' and `a5@+' change the register. Two fixtures added. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Three gaps made the gate refuse a toolchain whose crt0 carries the upstream fixes for all three bugs: - instruction_details() only knew the 2.39 `addr size name:' symbol line, so under 2.46's `addr <name>:' no instruction had a function and no call to main was counted; - the 32-bit displacement of the libb32 forms prints in hex without a prefix (`a4@(10)' for .bss+0x10) and was read as decimal; - ixemul's crt0.o, a different runtime with no ____start/exit pair, was counted as "not understood". With these, a toolchain built from AmigaPorts/m68k-amigaos-gcc 16.2-rc14 passes --check with all eleven crt0.o immune to all three bugs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
codewiz
force-pushed
the
build-with-binutils-2.46
branch
from
October 8, 2026 03:55
a58b27c to
75d5f98
Compare
tinic
added a commit
that referenced
this pull request
Oct 8, 2026
toolchain 16.2.5: GCC amiga16.2 134541b3 + binutils 2.46 (includes #205)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building the tree with a toolchain from AmigaPorts/m68k-amigaos-gcc 16.2-rc14 (gcc 16.2.0b, binutils 2.46, newlib
amigawith the crt0 fixes) fails three times. Each is a place where the project encodes binutils 2.39 behaviour; the pinned toolchain is not affected by any of the changes.Changes
crashguard.c: the trap stub'sasm()namesami_crash_saved_*andami_crash_bailoutin asm text, which the compiler does not parse, so under-fltothe symbols are made local and the stub's relocations point at the LTO plugin's empty placeholder. binutils 2.46 refuses that link ("defined in LTO IR but was made local by the compiler, and a non-LTO object references it"); 2.39 accepted it and relocated the stores to hunk 0, so the crash handler's register save was writing over the start of the first hunk.usedkeeps the symbols alive but not global;externally_visibledoes both. GCC-only attribute, which every m68k-amigaos toolchain is.cmake/check-a5-frame.cmake: 2.46's objdump printsmove.l d0,-316(a5)asmovel d0,a5@(-316); the checker dropped the@(...)and read the remaininga5as the destination, failing NetShutdown on a plain store into its frame. An operand ending in@after the parentheses are gone is a memory reference; onlya5@-anda5@+change the register. Two fixtures added, one PASS and one FAIL.tools/fix-toolchain-crt0.py: three gaps made--checkrefuse a toolchain whose crt0 already carries the upstream fixes for all three bugs.instruction_details()knew only the 2.39addr size name:symbol line, so underaddr <name>:no instruction had a function and no call to main was counted; the 32-bit displacement of the libb32 forms prints in hex without a prefix (a4@(10)for.bss+0x10) and was read as decimal; ixemul'scrt0.o, a different runtime with no____start/exitpair, was counted as "not understood".Verification
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-m68k-amigaos.cmakeconfigures against the rc14 toolchain;--checkreports all eleven newlibcrt0.oimmune to all three bugs.any) completes:bsdsocket.library,tls.library,usergroup.libraryand the four SANA-II drivers, no link or gate errors.tests/toolchain/test_crt0_gate.pystill passes.check_a5_frame_cases.cmake: all ten verdicts as expected.Not touched here: the new
-Wcallconv-mismatchfrom AmigaPorts/gcc#68 fires once, on then68k_copy_bytes_mv*table intests/perf/n68kmv.c.