• David Carrillo-Cisneros's avatar
    tools lib traceevent: Robustify do_generate_dynamic_list_file · 6467753d
    David Carrillo-Cisneros authored
    The dynamic-list-file used to export dynamic symbols introduced in
    
    commit e3d09ec8 ("tools lib traceevent: Export dynamic symbols
    used by traceevent plugins")
    
    is generated without any sort of error checking.
    
    I experienced problems due to an old version of nm (v 0.158) that outputs
    in a format distinct from the assumed by the script.
    
    Robustify the built of dynamic symbol list  by enforcing that the second
    column of $(NM) -u <files> is either "U" (Undefined), "W" or "w" (undefined
    weak), which are the possible outputs from non-ancient $(NM) versions.
    Print an error if format is unexpected.
    
    v2: Accept "W" and "w" symbol options.
    Signed-off-by: default avatarDavid Carrillo-Cisneros <davidcc@google.com>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: He Kuang <hekuang@huawei.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Michal Marek <mmarek@suse.com>
    Cc: Paul Turner <pjt@google.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/r/20170208052840.112182-1-davidcc@google.com
    [ Use STRING1 = STRING1 instead of == to make this work on Ubuntu systems ]
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    6467753d
Makefile 7.64 KB