Re: [PATCH] objtool: Make 'sec-address' always on
From: Josh Poimboeuf
Date: Thu Jun 22 2023 - 02:31:56 EST
On Wed, Jun 21, 2023 at 05:20:31PM +0200, Christophe Leroy wrote:
> Most of the time objtool warnings are useless without the
> absolute address within the section.
>
> Today there is --sec-address option to get it printed, but
> that option is nowhere used and requires a change in Makefile
> to use it.
>
> Having the address inside the section at all time in addition
> to the address within the object doesn't hurt and will help.
>
> Remove the --sec-address option and print it at all time.
This option actually feels like clutter to me. The func+offset format
works fine, combined with scripts like objdump-func and faddr2line. And
we also have a new OBJTOOL_VERBOSE=1 option which auto-disassembles the
affected function.
On x86 we've been using func+offset for console stack traces for many
years, due to KASLR. So maybe we're just more used to it. But the
scripts make it fine.
Also it helps with identifying the same warning across different
configs/compilers.
--
Josh