Commit 156069f8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fixes from Thomas Gleixner:
 "Two small fixes for objtool:

   - Support frame pointer setup via 'lea (%rsp), %rbp' which was not
     yet supported and caused build warnings

   - Disable unreacahble warnings for GCC4.4 and older to avoid false
     positives caused by the compiler itself"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Support unoptimized frame pointer setup
  objtool: Skip unreachable warnings for GCC 4.4 and older
parents a8c964ea 607a4029
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -265,6 +265,8 @@ objtool_args += --no-fp
endif
ifdef CONFIG_GCOV_KERNEL
objtool_args += --no-unreachable
else
objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
endif

# 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory
+8 −3
Original line number Diff line number Diff line
@@ -284,11 +284,16 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
	case 0x8d:
		if (sib == 0x24 && rex_w && !rex_b && !rex_x) {

			/* lea disp(%rsp), reg */
			*type = INSN_STACK;
			if (!insn.displacement.value) {
				/* lea (%rsp), reg */
				op->src.type = OP_SRC_REG;
			} else {
				/* lea disp(%rsp), reg */
				op->src.type = OP_SRC_ADD;
			op->src.reg = CFI_SP;
				op->src.offset = insn.displacement.value;
			}
			op->src.reg = CFI_SP;
			op->dest.type = OP_DEST_REG;
			op->dest.reg = op_to_cfi_reg[modrm_reg][rex_r];