-
Nicholas Piggin authored
Incremental linking is gone, so rename built-in.o to built-in.a, which is the usual extension for archive files. This patch does two things, first is a simple search/replace: git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g' The second is to invert nesting of nested text manipulations to avoid filtering built-in.a out from libs-y2: -libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y))) +libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
Nicholas Piggin authoredIncremental linking is gone, so rename built-in.o to built-in.a, which is the usual extension for archive files. This patch does two things, first is a simple search/replace: git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g' The second is to invert nesting of nested text manipulations to avoid filtering built-in.a out from libs-y2: -libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y))) +libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) Signed-off-by:
Nicholas Piggin <npiggin@gmail.com> Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
namespace.pl 13.05 KiB
#!/usr/bin/env perl
#
# namespace.pl. Mon Aug 30 2004
#
# Perform a name space analysis on the linux kernel.
#
# Copyright Keith Owens <kaos@ocs.com.au>. GPL.
#
# Invoke by changing directory to the top of the kernel object
# tree then namespace.pl, no parameters.
#
# Tuned for 2.1.x kernels with the new module handling, it will
# work with 2.0 kernels as well.
#
# Last change 2.6.9-rc1, adding support for separate source and object
# trees.
#
# The source must be compiled/assembled first, the object files
# are the primary input to this script. Incomplete or missing
# objects will result in a flawed analysis. Compile both vmlinux
# and modules.
#
# Even with complete objects, treat the result of the analysis
# with caution. Some external references are only used by
# certain architectures, others with certain combinations of
# configuration parameters. Ideally the source should include
# something like
#
# #ifndef CONFIG_...
# static
# #endif
# symbol_definition;
#
# so the symbols are defined as static unless a particular
# CONFIG_... requires it to be external.
#
# A symbol that is suffixed with '(export only)' has these properties
#
# * It is global.
# * It is marked EXPORT_SYMBOL or EXPORT_SYMBOL_GPL, either in the same
# source file or a different source file.
# * Given the current .config, nothing uses the symbol.
#
# The symbol is a candidate for conversion to static, plus removal of the
# export. But be careful that a different .config might use the symbol.
#
#
# Name space analysis and cleanup is an iterative process. You cannot
# expect to find all the problems in a single pass.
#
# * Identify possibly unnecessary global declarations, verify that they
# really are unnecessary and change them to static.
# * Compile and fix up gcc warnings about static, removing dead symbols
# as necessary.
# * make clean and rebuild with different configs (especially
# CONFIG_MODULES=n) to see which symbols are being defined when the
# config does not require them. These symbols bloat the kernel object
# for no good reason, which is frustrating for embedded systems.
# * Wrap config sensitive symbols in #ifdef CONFIG_foo, as long as the
# code does not get too ugly.
# * Repeat the name space analysis until you can live with with the
# result.
#
use warnings;
use strict;
use File::Find;
my $nm = ($ENV{'NM'} || "nm") . " -p";
my $objdump = ($ENV{'OBJDUMP'} || "objdump") . " -s -j .comment";