Files
Linux/tools/objtool
Nicholas Piggin cad90e5381 objtool: Tolerate STT_NOTYPE symbols at end of section
Hand-written asm often contains non-function symbols in executable
sections. _end symbols for finding the size of instruction blocks
for runtime processing is one such usage.

optprobe_template_end is one example that causes the warning:

  objtool: optprobe_template_end(): can't find starting instruction

This is because the symbol happens to be at the end of the file (and
therefore end of a section in the object file).

So ignore end-of-section STT_NOTYPE symbols instead of bailing out
because an instruction can't be found. While we're here, add a more
descriptive warning for STT_FUNC symbols found at the end of a
section.

[ This also solves a PowerPC regression reported by Sathvika Vasireddy. ]

Reported-by: Naveen N. Rao <[email protected]>
Reported-by: Sathvika Vasireddy <[email protected]>
Signed-off-by: Nicholas Piggin <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Sathvika Vasireddy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
2023-01-09 17:53:46 +01:00
..
2022-04-22 12:32:01 +02:00
2022-10-17 16:41:07 +02:00
2022-04-22 12:32:01 +02:00