]> git.baikalelectronics.ru Git - kernel.git/commit
objtool: Print data address for "!ENDBR" data warnings
authorJosh Poimboeuf <jpoimboe@redhat.com>
Mon, 18 Apr 2022 16:50:29 +0000 (09:50 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 19 Apr 2022 19:58:50 +0000 (21:58 +0200)
commit5358356a0f81dedfdf0368ecc7d112bbc24e86da
tree5a78594b0fef3c33bec53d784c487c1e1a2d3ca6
parent3cf925209984b69b301a2400dfdf0916aa70a54e
objtool: Print data address for "!ENDBR" data warnings

When a "!ENDBR" warning is reported for a data section, objtool just
prints the text address of the relocation target twice, without giving
any clues about the location of the original data reference:

  vmlinux.o: warning: objtool: dcbnl_netdevice_event()+0x0: .text+0xb64680: data relocation to !ENDBR: dcbnl_netdevice_event+0x0

Instead, print the address of the data reference, in addition to the
address of the relocation target.

  vmlinux.o: warning: objtool: dcbnl_nb+0x0: .data..read_mostly+0xe260: data relocation to !ENDBR: dcbnl_netdevice_event+0x0

Fixes: be9cf378935d ("objtool: Find unused ENDBR instructions")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/762e88d51300e8eaf0f933a5b0feae20ac033bea.1650300597.git.jpoimboe@redhat.com
tools/objtool/check.c