lkml.org 
[lkml]   [2007]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 01/14] kbuild: make modpost section warnings clearer
    From 4dba30ccfdb911b0810f6527de66b1515349d8c4 Mon Sep 17 00:00:00 2001
    From: Russell King <rmk+lkml@arm.linux.org.uk>
    Date: Thu, 10 May 2007 23:03:25 +0100
    Subject: [PATCH 01/14] kbuild: make modpost section warnings clearer

    Change modpost section mismatch warnings to be less confusing;
    model them on the binutils linker warnings which we all know how
    to interpret.

    Also, fix the wrong ordering of arguments for the final case -
    fromsec and refsymname were reversed.

    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    ---
    scripts/mod/modpost.c | 33 ++++++++++++++++-----------------
    1 files changed, 16 insertions(+), 17 deletions(-)

    diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
    index 113dc77..acd28ab 100644
    --- a/scripts/mod/modpost.c
    +++ b/scripts/mod/modpost.c
    @@ -885,29 +885,28 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
    return;

    if (before && after) {
    - warn("%s - Section mismatch: reference to %s:%s from %s "
    - "between '%s' (at offset 0x%llx) and '%s'\n",
    - modname, secname, refsymname, fromsec,
    + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s "
    + "(between '%s' and '%s')\n",
    + modname, fromsec, (long long)r.r_offset,
    + secname, refsymname,
    elf->strtab + before->st_name,
    - (long long)r.r_offset,
    elf->strtab + after->st_name);
    } else if (before) {
    - warn("%s - Section mismatch: reference to %s:%s from %s "
    - "after '%s' (at offset 0x%llx)\n",
    - modname, secname, refsymname, fromsec,
    - elf->strtab + before->st_name,
    - (long long)r.r_offset);
    + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s "
    + "(after '%s')\n",
    + modname, fromsec, (long long)r.r_offset,
    + secname, refsymname,
    + elf->strtab + before->st_name);
    } else if (after) {
    - warn("%s - Section mismatch: reference to %s:%s from %s "
    + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s "
    "before '%s' (at offset -0x%llx)\n",
    - modname, secname, refsymname, fromsec,
    - elf->strtab + after->st_name,
    - (long long)r.r_offset);
    + modname, fromsec, (long long)r.r_offset,
    + secname, refsymname,
    + elf->strtab + after->st_name);
    } else {
    - warn("%s - Section mismatch: reference to %s:%s from %s "
    - "(offset 0x%llx)\n",
    - modname, secname, fromsec, refsymname,
    - (long long)r.r_offset);
    + warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n",
    + modname, fromsec, (long long)r.r_offset,
    + secname, refsymname);
    }
    }

    --
    1.5.1.rc3.20.gaa453
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-05-18 08:51    [W:0.030 / U:122.328 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site