Repository navigation
[AUTOMATED] Load big-endian Octeon ELF32 images that declare O64 or no ABI as Octeon O64 - #1987
Merged
Merged
Conversation
…o ABI as Octeon O64
… spec 01 The O32 evidence for an Octeon ELF32 image without an ABI declaration is EF_MIPS_32BITMODE, which the assembler writes, an ABI-flags record with 32-bit GPRs, or a GCC .mdebug.abi* marker; the paragraph credited GCC with the header flag and left out the ABI-flags record the code also checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Contributor
|
[AUTOMATED] Pushed 071d08c, a spec-only wording fix: spec 01 credited GCC with writing |
…O64 selection branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
…O64 selection branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
…ab#1988) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
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.
What this changes
A big-endian Octeon ELF32 image that declares O64, or no ABI at all, loads as generic MIPS32, so Octeon's
bbit0reads as a COP2 load and 64-bit instructions such asdextdo not decode. With Ubuntu'sbinutils-mips64-linux-gnuabi64:With this change the same command prints:
With the header's ABI bits cleared, as toolchains that write none leave them (
printf '\200\213\000\000' | dd of=octeon.o bs=1 seek=36 conv=notrunc status=none), both outputs stay the same, and this branch also notes64-bit MIPS instructions in ELF32 with no ABI declaration; assuming O64 (MIPS:BE:64:octeon-32addr:o64); use --target to specify another ABI.The change
MIPS:BE:64:octeon-32addr:o64, the target added in [AUTOMATED] Add an explicit soft-float O64 target for big-endian Octeon ELF32 #1828. The output equals that--target's.EF_MIPS_32BITMODEfor O32 on a 64-bit ISA, and GCC emits a.mdebug.abi32section. The generic selector already makes this assumption for images without a machine tag..mdebugmarker. So do Octeon Plus and later, which have no O64 model, and little-endian images.--targetstill wins.Tests
tests/fixtures/octeon-elf32/adds GCC 7.3 images, with their recipe, for these cases, a PIC O64 shared object, and a generic MIPS64r2 image with a reallwc2.tests/stages/kuna-mips-octeon-elf32-o64.xmlchecks a CRC's bit-15 branch, a five-argument call and thelwc2control; all five assertions fail on main. CLI tests check each note,--target, and that automatic output equals the explicit target's. The CRC's instructions under QEMU Octeon68XX and its emitted C at-O0and-O2with UBSan matchbinascii.crc_hqxon 259 inputs.Model:
anthropic/claude-opus-5-5