]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Merge branch 'objtool/core'
authorIngo Molnar <mingo@kernel.org>
Mon, 12 Apr 2021 08:27:12 +0000 (10:27 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Apr 2021 08:27:12 +0000 (10:27 +0200)
Conflicts:
tools/objtool/arch/x86/decode.c

1  2 
tools/objtool/arch/x86/decode.c
tools/objtool/check.c
tools/objtool/include/objtool/arch.h
tools/objtool/objtool.c

index 7e8b5bedd946cc7f244e3f4425d4c9fc46934058,431bafb881d443a82caaa221f4d4745a6d2daade..cedf3ede75455ffe57648d1168b480db9ffc1aba
  #include <objtool/elf.h>
  #include <objtool/arch.h>
  #include <objtool/warn.h>
 +#include <arch/elf.h>
  
- static unsigned char op_to_cfi_reg[][2] = {
-       {CFI_AX, CFI_R8},
-       {CFI_CX, CFI_R9},
-       {CFI_DX, CFI_R10},
-       {CFI_BX, CFI_R11},
-       {CFI_SP, CFI_R12},
-       {CFI_BP, CFI_R13},
-       {CFI_SI, CFI_R14},
-       {CFI_DI, CFI_R15},
- };
  static int is_x86_64(const struct elf *elf)
  {
        switch (elf->ehdr.e_machine) {
@@@ -94,12 -104,14 +108,14 @@@ int arch_decode_instruction(const struc
                            struct list_head *ops_list)
  {
        struct insn insn;
-       int x86_64, sign, ret;
-       unsigned char op1, op2, rex = 0, rex_b = 0, rex_r = 0, rex_w = 0,
-                     rex_x = 0, modrm = 0, modrm_mod = 0, modrm_rm = 0,
-                     modrm_reg = 0, sib = 0;
 -      int x86_64;
++      int x86_64, ret;
+       unsigned char op1, op2,
+                     rex = 0, rex_b = 0, rex_r = 0, rex_w = 0, rex_x = 0,
+                     modrm = 0, modrm_mod = 0, modrm_rm = 0, modrm_reg = 0,
+                     sib = 0, /* sib_scale = 0, */ sib_index = 0, sib_base = 0;
        struct stack_op *op = NULL;
        struct symbol *sym;
+       u64 imm;
  
        x86_64 = is_x86_64(elf);
        if (x86_64 == -1)
index 1f4154f9b04b5dcc04b7f6b988a82a3a27438d8c,a0f762a15ad509128c13adbd1fd4320ec4d5f219..a0a8ce61cd4d0a3493b17358c723381ed9b2781e
@@@ -2449,12 -2422,9 +2432,12 @@@ static int handle_insn_ops(struct instr
  
        list_for_each_entry(op, &insn->stack_ops, list) {
  
-               if (update_cfi_state(insn, &state->cfi, op))
+               if (update_cfi_state(insn, next_insn, &state->cfi, op))
                        return 1;
  
 +              if (!insn->alt_group)
 +                      continue;
 +
                if (op->dest.type == OP_DEST_PUSHF) {
                        if (!state->uaccess_stack) {
                                state->uaccess_stack = 1;
Simple merge
index 3a3ea1b4e4da82a971f5754902469c835a69db69,43c1836a06b447756a7c7b5ad5d834e846f3b767..e21db8bce4935c91ed313f374ad32ea45ffc938a
@@@ -59,9 -118,13 +118,14 @@@ struct objtool_file *objtool_open_read(
        if (!file.elf)
                return NULL;
  
+       if (backup && !objtool_create_backup(objname)) {
+               WARN("can't create backup file");
+               return NULL;
+       }
        INIT_LIST_HEAD(&file.insn_list);
        hash_init(file.insn_hash);
 +      INIT_LIST_HEAD(&file.retpoline_call_list);
        INIT_LIST_HEAD(&file.static_call_list);
        INIT_LIST_HEAD(&file.mcount_loc_list);
        file.c_file = !vmlinux && find_section_by_name(file.elf, ".comment");