lkml.org 
[lkml]   [2021]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip: objtool/core] objtool: Parse options from OBJTOOL_ARGS
On Wed, Mar 03, 2021 at 08:45:31AM -0000, tip-bot2 for Peter Zijlstra wrote:
> The following commit has been merged into the objtool/core branch of tip:
>
> Commit-ID: b52eb21aeca75790869c26b91b1d7b80b3946430
> Gitweb: https://git.kernel.org/tip/b52eb21aeca75790869c26b91b1d7b80b3946430
> Author: Peter Zijlstra <peterz@infradead.org>
> AuthorDate: Fri, 26 Feb 2021 11:32:30 +01:00
> Committer: Peter Zijlstra <peterz@infradead.org>
> CommitterDate: Wed, 03 Mar 2021 09:38:32 +01:00
>
> objtool: Parse options from OBJTOOL_ARGS
>
> Teach objtool to parse options from the OBJTOOL_ARGS environment
> variable.
>
> This enables things like:
>
> $ OBJTOOL_ARGS="--backup" make O=defconfig-build/ kernel/ponies.o
>
> to obtain both defconfig-build/kernel/ponies.o{,.orig} and easily
> inspect what objtool actually did.

Latest objdiff.sh to go with this:

$ cat objdiff.sh
#!/bin/bash

name=$1
pre=${name}.orig
post=${name}

function to_text {
obj=$1
( objdump -wdr $obj;
readelf -W --relocs --symbols $obj |
awk '/^Relocation section/ { $6=0 } { print $0 }'
) > ${obj}.tmp
}

to_text $pre
to_text $post

diff -u ${pre}.tmp ${post}.tmp

rm ${pre}.tmp ${post}.tmp

\
 
 \ /
  Last update: 2021-03-04 15:16    [W:0.075 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site