mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] binfmt_elf: Reorder objects in Makefile to favor platform default.
@ 2009-10-19 14:25 Ryan C. Gordon
  2009-10-19 16:26 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Ryan C. Gordon @ 2009-10-19 14:25 UTC (permalink / raw)
  To: linux-kernel

Reordered object list so compat_binfmt_elf.o comes first. This will make it
call register_binfmt() first, inserting it at the end of the list.

Now the kernel will try the compatibility formats as a backup if the actual
system format rejects the binary. As almost all binaries loaded won't be
compatibility formats, this saves a few cycles for each process.

Signed-off-by: Ryan C. Gordon <icculus@icculus.org>
---
 fs/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/Makefile b/fs/Makefile
index af6d047..173d153 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -40,8 +40,9 @@ obj-$(CONFIG_BINFMT_MISC)	+= binfmt_misc.o
 # binfmt_script is always there
 obj-y				+= binfmt_script.o
 
-obj-$(CONFIG_BINFMT_ELF)	+= binfmt_elf.o
+# List compat_* first, so they insert at end of the list, and are tried last.
 obj-$(CONFIG_COMPAT_BINFMT_ELF)	+= compat_binfmt_elf.o
+obj-$(CONFIG_BINFMT_ELF)	+= binfmt_elf.o
 obj-$(CONFIG_BINFMT_ELF_FDPIC)	+= binfmt_elf_fdpic.o
 obj-$(CONFIG_BINFMT_SOM)	+= binfmt_som.o
 obj-$(CONFIG_BINFMT_FLAT)	+= binfmt_flat.o
-- 
1.6.0.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-21  7:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 14:25 [PATCH] binfmt_elf: Reorder objects in Makefile to favor platform default Ryan C. Gordon
2009-10-19 16:26 ` Andreas Schwab
2009-10-20  4:34   ` Ryan C. Gordon
2009-10-21  7:59     ` Ryan C. Gordon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®