lkml.org 
[lkml]   [2014]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 1/3] init.h: Add __init_str / __exit_str macros
From
Date
On Mon, 2014-06-23 at 00:46 +0200, Mathias Krause wrote:
> Add macros to be able to mark string literals used in __init / __exit
> functions.
[]
> diff --git a/include/linux/init.h b/include/linux/init.h
[]
> +#define __init_str(str) __mark_str(str, __UNIQUE_ID(_init_str_), __initconst)
> +#define __exit_str(str) __mark_str(str, __UNIQUE_ID(_exit_str_), __exitdata)
> +#define __mark_str(str, var, __section) \
> + ({ static const char var[] __section __aligned(1) = str; var; })
> +

You probably want to make these strings vanish
completely when !CONFIG_PRINTK.

As is, they will always exist in the image.




\
 
 \ /
  Last update: 2014-06-24 22:21    [W:0.181 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site