Skip to contentSkip to conversation

MIPS: boot: elf2ecoff: Ignore the PT_MIPS_ABIFLAGS section

PATCH New Markos Chandras 1 participant 1 message Feb 2, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: boot: elf2ecoff: Ignore the PT_MIPS_ABIFLAGS section

The latest MIPS tools generate a PT_MIPS_ABIFLAGS section in the ELF files. Support for this section has been added in 6cd962292d9eb3b "MIPS: ELF: Add definition for the .MIPS.abiflags section". The elf2ecoff utility has no knowledge of that section and that breaks the rm200 build

ECOFF arch/mips/boot/vmlinux.ecoff
Program header 3 type 1879048195 can't be converted. arch/mips/boot/Makefile:30: recipe for target 'arch/mips/boot/vmlinux.ecoff' failed
make[1]: *** [arch/mips/boot/vmlinux.ecoff] Error 1

So we add this section to the ones we should ignore.

---
 arch/mips/boot/elf2ecoff.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/mips/boot/elf2ecoff.c +3 -1
index 8585078ae50e..12568a2ad62e 100644
@@ -50,6 +50,7 @@
  * Some extra ELF definitions
  */
 #define PT_MIPS_REGINFO 0x70000000	/* Register usage information */
+#define PT_MIPS_ABIFLAGS 0x70000003
 
 /* -------------------------------------------------------------------- */
 
@@ -351,7 +352,8 @@ int main(int argc, char *argv[])
 		/* Section types we can ignore... */
 		if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE ||
 		    ph[i].p_type == PT_PHDR
-		    || ph[i].p_type == PT_MIPS_REGINFO)
+		    || ph[i].p_type == PT_MIPS_REGINFO
+		    || ph[i].p_type == PT_MIPS_ABIFLAGS)
 			continue;
 		/* Section types we can't handle... */
 		else if (ph[i].p_type != PT_LOAD) {
Signature · 1 line
2.2.2