lkml.org 
[lkml]   [2015]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] modpost: mismatch_handler: retrieve tosym information only when needed.
Adding Rusty and Michal to CC.

On Tue, Mar 17, 2015 at 01:40:00PM +0100, Quentin Casasnovas wrote:
> Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
> ---
> scripts/mod/modpost.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index c69681e..bf0cf81 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1432,16 +1432,17 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
> const char *tosym;
> const char *fromsym;
>
> - tosec = sec_name(elf, get_secindex(elf, sym));
> from = find_elf_symbol2(elf, r->r_offset, fromsec);
> fromsym = sym_name(elf, from);
> - to = find_elf_symbol(elf, r->r_addend, sym);
> - tosym = sym_name(elf, to);
>
> if (!strncmp(fromsym, "reference___initcall",
> sizeof("reference___initcall")-1))
> return;
>
> + tosec = sec_name(elf, get_secindex(elf, sym));
> + to = find_elf_symbol(elf, r->r_addend, sym);
> + tosym = sym_name(elf, to);
> +
> /* check whitelist - we may ignore it */
> if (secref_whitelist(mismatch,
> fromsec, fromsym, tosec, tosym)) {
> --
> 2.0.5
>


\
 
 \ /
  Last update: 2015-03-18 10:21    [W:0.137 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site