Skip to content

Commit

Permalink
kbuild/extable: Hook up sortextable into the build system.
Browse files Browse the repository at this point in the history
Define a config variable BUILDTIME_EXTABLE_SORT to control build time
sorting of the kernel's exception table.

Patch Makefile to do the sorting when BUILDTIME_EXTABLE_SORT is
selected.

Signed-off-by: David Daney <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected]>
  • Loading branch information
daviddaney authored and H. Peter Anvin committed Apr 19, 2012
1 parent d219e2e commit 1dbdc6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,10 @@ quiet_cmd_vmlinux_version = GEN .version
quiet_cmd_sysmap = SYSMAP
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap

# Sort exception table at build time
quiet_cmd_sortextable = SORTEX
cmd_sortextable = $(objtree)/scripts/sortextable

# Link of vmlinux
# If CONFIG_KALLSYMS is set .version is already updated
# Generate System.map and verify that the content is consistent
Expand All @@ -796,6 +800,12 @@ define rule_vmlinux__
$(call cmd,vmlinux__)
$(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd

$(if $(CONFIG_BUILDTIME_EXTABLE_SORT), \
$(Q)$(if $($(quiet)cmd_sortextable), \
echo ' $($(quiet)cmd_sortextable) vmlinux' &&) \
$(cmd_sortextable) vmlinux)


$(Q)$(if $($(quiet)cmd_sysmap), \
echo ' $($(quiet)cmd_sysmap) System.map' &&) \
$(cmd_sysmap) $@ System.map; \
Expand Down
3 changes: 3 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ config IRQ_WORK
bool
depends on HAVE_IRQ_WORK

config BUILDTIME_EXTABLE_SORT
bool

menu "General setup"

config EXPERIMENTAL
Expand Down

0 comments on commit 1dbdc6f

Please sign in to comment.