Page MenuHomePhabricator

[mips] Correct ELF e_flags for the N32 ABI when using a mips-* triple rather than a mips64-* triple
ClosedPublic

Authored by dsanders on Jul 16 2014, 7:38 AM.

Details

Summary

Generally speaking, mips-* vs mips64-* should not be used to make decisions
about the content or format of the ELF. This should be based on the ABI
and CPU in use. For example, mips-linux-gnu-clang -mips64r2 -mabi=64
should produce an ELF64 as should mips64-linux-gnu-clang -mabi=64.
Conversely, mips64-linux-gnu-clang -mabi=n32 should produce an ELF32 as
should mips-linux-gnu-clang -mips64r2 -mabi=n32.

This patch fixes the e_flags but leaves the ELF32 vs ELF64 issue for now
since there is no apparent way to base this decision on the ABI and CPU.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 11513.Jul 16 2014, 7:38 AM
dsanders retitled this revision from to [mips] Correct ELF e_flags for the N32 ABI when using a mips-* triple rather than a mips64-* triple.
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders added reviewers: sstankovic, vmedic.
dsanders accepted this revision.Jul 17 2014, 3:10 AM
dsanders added a reviewer: dsanders.
This revision is now accepted and ready to land.Jul 17 2014, 3:10 AM
dsanders closed this revision.Jul 17 2014, 3:10 AM