diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-03-21 02:50:01 +0100 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2015-06-11 15:08:32 +0200 |
commit | 50ab9a69275dca588cb5ad5038657f069bbdeb56 (patch) | |
tree | efbc69d993a916f8a38dd8d61bcc75eca4edcc97 /lib/debug_info.c | |
parent | cc8475305203ddfd117b81e2e732194b67d8f310 (diff) | |
download | linux-50ab9a69275dca588cb5ad5038657f069bbdeb56.tar.bz2 |
kbuild: include core debug info when DEBUG_INFO_REDUCED
With CONFIG_DEBUG_INFO_REDUCED, we do get quite a lot of debug info
(around 22.7 MB for a defconfig+DEBUG_INFO_REDUCED). However, the
"basenames must match" rule used by -femit-struct-debug-baseonly
option means that we miss some core data structures, such as struct
{device, file, inode, mm_struct, page} etc.
We can easily get these included as well, while still getting the
benefits of CONFIG_DEBUG_INFO_REDUCED (faster build times and smaller
individual object files): All it takes is a dummy translation unit
including a few strategic headers and compiled with a flag overriding
-femit-struct-debug-baseonly.
This increases the size of .debug_info by ~0.3%, but these 90 KB
contain some rather useful info.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'lib/debug_info.c')
-rw-r--r-- | lib/debug_info.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/debug_info.c b/lib/debug_info.c new file mode 100644 index 000000000000..2edbe27517ed --- /dev/null +++ b/lib/debug_info.c @@ -0,0 +1,27 @@ +/* + * This file exists solely to ensure debug information for some core + * data structures is included in the final image even for + * CONFIG_DEBUG_INFO_REDUCED. Please do not add actual code. However, + * adding appropriate #includes is fine. + */ +#include <stdarg.h> + +#include <linux/cred.h> +#include <linux/crypto.h> +#include <linux/dcache.h> +#include <linux/device.h> +#include <linux/fs.h> +#include <linux/fscache-cache.h> +#include <linux/io.h> +#include <linux/kallsyms.h> +#include <linux/kernel.h> +#include <linux/kobject.h> +#include <linux/mm.h> +#include <linux/module.h> +#include <linux/net.h> +#include <linux/sched.h> +#include <linux/slab.h> +#include <linux/types.h> +#include <net/addrconf.h> +#include <net/sock.h> +#include <net/tcp.h> |