lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC][PATCH 00/36] objtool: Make recordmcount a subcommand
    From
    Date
    Hi Matt,

    On 4/10/20 8:35 PM, Matt Helsley wrote:
    > recordmcount has its own ELF wrapper code and could utilize
    > objtool's ELF code to more-portably handle architecture variations.
    > This series makes recordmcount a subcommand of objtool.
    >
    > The initial 5 patches make objtool compilable for more than x86.
    > Unlike recordmcount the check command and orc tools are not currently
    > checking other architectures so we need a way to cleanly build
    > objtool for those architectures that don't support check / orc. I
    > went with using weak symbols and added a "missing" architecture
    > which can be used to indicate the tool is not implemented while
    > avoiding the need for every architecture to explicitly specify
    > which subcommands / features are not implemented. I'm curious if
    > there are better approaches folks recommend though -- this is the
    > one I landed on. The patches do not add HAVE_OBJTOOL to all
    > architectures.
    >

    If all you need from objtool it the elf parsing code, wouldn't it make
    more sense to move that out of objtool, as a utility library that both
    objtool and recordmcount could use (and perhaps other tools in the future?)

    In patch 3 you seem to mention that other tools already have their own
    code to parse elf. So instead of converting everything as an objtool
    subcommand, maybe just have the library with the required functionality.

    Any opinions on the above? What do people prefer?

    Cheers,

    --
    Julien Thierry

    \
     
     \ /
      Last update: 2020-04-14 09:25    [W:3.395 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site