From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thiemo Seufer To: binutils@sources.redhat.com Subject: [PATCH] Fix bfd ABI string for MIPS Date: Wed, 15 Aug 2001 14:40:00 -0000 Message-id: <20010816034148.K381@rembrandt.csv.ica.uni-stuttgart.de> X-SW-Source: 2001-08/msg00323.html Hi All, currently bfd returns for the MIPS ABI string "N32" for every ELF object with header flag EF_MIPS_ABI2 set and "64" for every ELF object which is 64bit. This means E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64 are named wrongly as "64", and an object with EF_MIPS_ABI2 and arbitrary other flags set is also wrongly called "N32". The patch below fixes this. Thiemo 2001-08-16 Thiemo Seufer /bfd/ChangeLog * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64 diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/elf32-mips.c src/bfd/elf32-mips.c --- src-orig/bfd/elf32-mips.c Mon Jun 18 21:48:24 2001 +++ src/bfd/elf32-mips.c Thu Jun 21 07:45:18 2001 @@ -1928,16 +1928,16 @@ { flagword flags; - if (ABI_N32_P (abfd)) - return "N32"; - else if (ABI_64_P (abfd)) - return "64"; - flags = elf_elfheader (abfd)->e_flags; switch (flags & EF_MIPS_ABI) { case 0: - return "none"; + if (ABI_N32_P (abfd)) + return "N32"; + else if (ABI_64_P (abfd)) + return "64"; + else + return "none"; case E_MIPS_ABI_O32: return "O32"; case E_MIPS_ABI_O64: