I think the objtool works on individual object files (or vmlinux.o).
The -Wl,--gc-sections flag, on the other hand, is a linker flag that
acts on the final link -- it's applied after objtool invocations.
Therefore, even with -Wl,--gc-sections, we'll still encounter those
spurious warnings from objt
On Mon, Oct 28, 2024 at 05:16:44PM -0700, Kees Cook wrote:
> On Fri, Oct 25, 2024 at 10:14:04PM -0700, Rong Xu wrote:
> > In the presence of both weak and strong function definitions, the
> > linker drops the weak symbol in favor of a strong symbol, but
> > leaves the code in place. Code in ignore_
On 10/28/24 17:16, Kees Cook wrote:
On Fri, Oct 25, 2024 at 10:14:04PM -0700, Rong Xu wrote:
In the presence of both weak and strong function definitions, the
linker drops the weak symbol in favor of a strong symbol, but
leaves the code in place. Code in ignore_unreachable_insn() has
some heuris
On Fri, Oct 25, 2024 at 10:14:04PM -0700, Rong Xu wrote:
> In the presence of both weak and strong function definitions, the
> linker drops the weak symbol in favor of a strong symbol, but
> leaves the code in place. Code in ignore_unreachable_insn() has
> some heuristics to suppress the warning, b
In the presence of both weak and strong function definitions, the
linker drops the weak symbol in favor of a strong symbol, but
leaves the code in place. Code in ignore_unreachable_insn() has
some heuristics to suppress the warning, but it does not work when
-ffunction-sections is enabled.
Suppose