mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-09 10:20:34 +00:00
[mips] Fix ELF header flags.
As opposed to GCC/GAS the default ABI for Mips64 is n64. Compatibility bit should be set if o32 ABI is used when targeting Mips64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200332 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -137,7 +137,14 @@ MipsTargetELFStreamer::MipsTargetELFStreamer(MCStreamer &S,
|
||||
EFlags |= ELF::EF_MIPS_ARCH_32;
|
||||
|
||||
if (T.isArch64Bit()) {
|
||||
EFlags |= ELF::EF_MIPS_ABI2;
|
||||
if (Features & Mips::FeatureN32)
|
||||
EFlags |= ELF::EF_MIPS_ABI2;
|
||||
else if (Features & Mips::FeatureO32) {
|
||||
EFlags |= ELF::EF_MIPS_ABI_O32;
|
||||
EFlags |= ELF::EF_MIPS_32BITMODE; /* Compatibility Mode */
|
||||
}
|
||||
// No need to set any bit for N64 which is the default ABI at the moment
|
||||
// for 64-bit Mips architectures.
|
||||
} else {
|
||||
if (Features & Mips::FeatureMips64r2 || Features & Mips::FeatureMips64)
|
||||
EFlags |= ELF::EF_MIPS_32BITMODE;
|
||||
|
||||
Reference in New Issue
Block a user