Commit cf4d5be8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fix from Ingo Molnar:

 - Fix objtool to be more permissive with hand-written assembly that
   uses non-function symbols in executable sections.

* tag 'core-urgent-2023-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Tolerate STT_NOTYPE symbols at end of section
parents f129b616 cad90e53
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -427,6 +427,15 @@ static int decode_instructions(struct objtool_file *file)
			if (func->type != STT_NOTYPE && func->type != STT_FUNC)
				continue;

			if (func->offset == sec->sh.sh_size) {
				/* Heuristic: likely an "end" symbol */
				if (func->type == STT_NOTYPE)
					continue;
				WARN("%s(): STT_FUNC at end of section",
				     func->name);
				return -1;
			}

			if (func->return_thunk || func->alias != func)
				continue;