Commit e2a366dc5cead7b8bf7911a1de52f16748f6fcb3
Committed by
Linus Torvalds
1 parent
2cd9cdce18
Exists in
master
and in
7 other branches
FLAT binaries: drop BINFMT_FLAT bad header magic warning
The warning issued by fs/binfmt_flat.c when the format handler is given a non-FLAT and non-script executable is annoying to say the least when working with FDPIC ELF objects. If you build a kernel that supports both FLAT and FDPIC ELFs on no-mmu, every time you execute an FDPIC ELF, the kernel spits out this message. While I understand a lot of newcomers to the no-mmu world screw up generation of FLAT binaries, this warning is not usable for systems that support more than just FLAT. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Bernd Schmidt <bernds_cb1@t-online.de> Acked-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
fs/binfmt_flat.c
... | ... | @@ -443,12 +443,12 @@ |
443 | 443 | |
444 | 444 | if (strncmp(hdr->magic, "bFLT", 4)) { |
445 | 445 | /* |
446 | + * Previously, here was a printk to tell people | |
447 | + * "BINFMT_FLAT: bad header magic". | |
448 | + * But for the kernel which also use ELF FD-PIC format, this | |
449 | + * error message is confusing. | |
446 | 450 | * because a lot of people do not manage to produce good |
447 | - * flat binaries, we leave this printk to help them realise | |
448 | - * the problem. We only print the error if its not a script file | |
449 | 451 | */ |
450 | - if (strncmp(hdr->magic, "#!", 2)) | |
451 | - printk("BINFMT_FLAT: bad header magic\n"); | |
452 | 452 | ret = -ENOEXEC; |
453 | 453 | goto err; |
454 | 454 | } |