Skip to content

Commit

Permalink
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/tip

Pull objtool fixes from Thomas Gleixner:
 "Three fixlets for objtool:

   - Address two segfaults related to missing parameter and clang
     objects

   - Make it compile clean with clang"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Fix seg fault with clang-compiled objects
  objtool: Fix seg fault caused by missing parameter
  objtool: Fix Clang enum conversion warning
  • Loading branch information
torvalds committed Dec 31, 2017
2 parents 8371e5a + ce90aaf commit 31336ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/objtool/arch/x86/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
*type = INSN_STACK;
op->src.type = OP_SRC_ADD;
op->src.reg = op_to_cfi_reg[modrm_reg][rex_r];
op->dest.type = OP_SRC_REG;
op->dest.type = OP_DEST_REG;
op->dest.reg = CFI_SP;
}
break;
Expand Down
4 changes: 3 additions & 1 deletion tools/objtool/builtin-orc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ int cmd_orc(int argc, const char **argv)
const char *objname;

argc--; argv++;
if (argc <= 0)
usage_with_options(orc_usage, check_options);

if (!strncmp(argv[0], "gen", 3)) {
argc = parse_options(argc, argv, check_options, orc_usage, 0);
if (argc != 1)
Expand All @@ -52,7 +55,6 @@ int cmd_orc(int argc, const char **argv)
objname = argv[0];

return check(objname, no_fp, no_unreachable, true);

}

if (!strcmp(argv[0], "dump")) {
Expand Down
2 changes: 2 additions & 0 deletions tools/objtool/orc_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ int create_orc_sections(struct objtool_file *file)

/* create .orc_unwind_ip and .rela.orc_unwind_ip sections */
sec = elf_create_section(file->elf, ".orc_unwind_ip", sizeof(int), idx);
if (!sec)
return -1;

ip_relasec = elf_create_rela_section(file->elf, sec);
if (!ip_relasec)
Expand Down

0 comments on commit 31336ed

Please sign in to comment.