Re: [tip: objtool/core] objtool: Parse options from OBJTOOL_ARGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> AuthorDate:    Fri, 26 Feb 2021 11:32:30 +01:00
> Committer:     Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> 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



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux