mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/8] Add objtool and orc support for LoongArch
@ 2023-10-09 13:03 Tiezhu Yang
  2023-10-09 13:03 ` [PATCH v2 1/8] objtool/LoongArch: Enable objtool to be built Tiezhu Yang
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Tiezhu Yang @ 2023-10-09 13:03 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Huacai Chen
  Cc: loongarch, linux-kernel, loongson-kernel

This version is based on 6.6-rc5, tested with the latest upstream
gcc and binutils (20231009), all of the objtool warnings have been
silenced.

The patches #5, #6 and #7 are based on the following objdump info:
the latest upstream gas of LoongArch replaces a pair of ADD32/64
and SUB32/64 with 32/64_PCREL, and the option -mrelax is used by
default, there are local labels for the branch and jump operation,
the reloc symbol is label + offset instead of section + offset.

The binutils should contain the following two commits:
(1) Use 32/64_PCREL to replace a pair of ADD32/64 and SUB32/64
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ecb802d02eeb
(2) as: add option for generate R_LARCH_32/64_PCREL
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=816029e06768

Tiezhu Yang (8):
  objtool/LoongArch: Enable objtool to be built
  objtool/LoongArch: Implement instruction decoder
  objtool/x86: Separate arch-specific and generic parts
  objtool/LoongArch: Enable orc to be built
  objtool: Check local label about sibling call
  objtool: Check local label in add_dead_ends()
  objtool: Check local label in read_unwind_hints()
  LoongArch: Add ORC unwinder support

 arch/loongarch/Kconfig                             |   2 +
 arch/loongarch/Kconfig.debug                       |  11 +
 arch/loongarch/Makefile                            |  23 +
 arch/loongarch/configs/loongson3_defconfig         |   1 +
 arch/loongarch/include/asm/Kbuild                  |   1 +
 arch/loongarch/include/asm/bug.h                   |   1 +
 arch/loongarch/include/asm/linkage.h               |   2 +
 arch/loongarch/include/asm/module.h                |   7 +
 arch/loongarch/include/asm/orc_header.h            |  19 +
 arch/loongarch/include/asm/orc_lookup.h            |  34 ++
 arch/loongarch/include/asm/orc_types.h             |  58 +++
 arch/loongarch/include/asm/stackframe.h            |   3 +
 arch/loongarch/include/asm/unwind.h                |  22 +-
 arch/loongarch/include/asm/unwind_hints.h          |  28 +
 arch/loongarch/kernel/Makefile                     |   3 +
 arch/loongarch/kernel/entry.S                      |   9 +-
 arch/loongarch/kernel/genex.S                      |  20 +-
 arch/loongarch/kernel/head.S                       |   1 +
 arch/loongarch/kernel/module.c                     |  11 +-
 arch/loongarch/kernel/relocate_kernel.S            |   2 +
 arch/loongarch/kernel/setup.c                      |   2 +
 arch/loongarch/kernel/stacktrace.c                 |   1 +
 arch/loongarch/kernel/unwind_orc.c                 | 571 +++++++++++++++++++++
 arch/loongarch/kernel/vmlinux.lds.S                |   3 +
 arch/loongarch/lib/Makefile                        |   2 +
 arch/loongarch/mm/tlbex.S                          |  45 +-
 arch/loongarch/power/Makefile                      |   2 +
 arch/loongarch/vdso/Makefile                       |   1 +
 include/linux/compiler.h                           |   9 +
 scripts/Makefile                                   |   5 +-
 tools/arch/loongarch/include/asm/inst.h            | 161 ++++++
 tools/arch/loongarch/include/asm/orc_types.h       |  58 +++
 tools/include/linux/bitops.h                       |  11 +
 tools/objtool/Makefile                             |   4 +
 tools/objtool/arch/loongarch/Build                 |   3 +
 tools/objtool/arch/loongarch/decode.c              | 334 ++++++++++++
 .../objtool/arch/loongarch/include/arch/cfi_regs.h |  21 +
 tools/objtool/arch/loongarch/include/arch/elf.h    |  30 ++
 .../objtool/arch/loongarch/include/arch/special.h  |  33 ++
 tools/objtool/arch/loongarch/orc.c                 | 155 ++++++
 tools/objtool/arch/loongarch/special.c             |  15 +
 tools/objtool/arch/x86/Build                       |   1 +
 tools/objtool/arch/x86/orc.c                       | 169 ++++++
 tools/objtool/check.c                              | 118 +++--
 tools/objtool/include/objtool/orc.h                |  10 +
 tools/objtool/orc_dump.c                           |  69 +--
 tools/objtool/orc_gen.c                            |  92 +---
 47 files changed, 1949 insertions(+), 234 deletions(-)
 create mode 100644 arch/loongarch/include/asm/orc_header.h
 create mode 100644 arch/loongarch/include/asm/orc_lookup.h
 create mode 100644 arch/loongarch/include/asm/orc_types.h
 create mode 100644 arch/loongarch/include/asm/unwind_hints.h
 create mode 100644 arch/loongarch/kernel/unwind_orc.c
 create mode 100644 tools/arch/loongarch/include/asm/inst.h
 create mode 100644 tools/arch/loongarch/include/asm/orc_types.h
 create mode 100644 tools/objtool/arch/loongarch/Build
 create mode 100644 tools/objtool/arch/loongarch/decode.c
 create mode 100644 tools/objtool/arch/loongarch/include/arch/cfi_regs.h
 create mode 100644 tools/objtool/arch/loongarch/include/arch/elf.h
 create mode 100644 tools/objtool/arch/loongarch/include/arch/special.h
 create mode 100644 tools/objtool/arch/loongarch/orc.c
 create mode 100644 tools/objtool/arch/loongarch/special.c
 create mode 100644 tools/objtool/arch/x86/orc.c
 create mode 100644 tools/objtool/include/objtool/orc.h

-- 
2.1.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-10-18 11:45 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-09 13:03 [PATCH v2 0/8] Add objtool and orc support for LoongArch Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 1/8] objtool/LoongArch: Enable objtool to be built Tiezhu Yang
2023-10-10 12:45   ` Huacai Chen
2023-10-14  2:12     ` Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 2/8] objtool/LoongArch: Implement instruction decoder Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 3/8] objtool/x86: Separate arch-specific and generic parts Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 4/8] objtool/LoongArch: Enable orc to be built Tiezhu Yang
2023-10-10 12:52   ` Huacai Chen
2023-10-14  3:40     ` Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 5/8] objtool: Check local label about sibling call Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 6/8] objtool: Check local label in add_dead_ends() Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 7/8] objtool: Check local label in read_unwind_hints() Tiezhu Yang
2023-10-09 13:03 ` [PATCH v2 8/8] LoongArch: Add ORC unwinder support Tiezhu Yang
2023-10-10 13:46   ` kernel test robot
2023-10-18 11:44     ` Tiezhu Yang
2023-10-10 14:43   ` kernel test robot
2023-10-11  4:37   ` Huacai Chen
2023-10-14  9:21     ` Tiezhu Yang
2023-10-14 11:37       ` Huacai Chen
2023-10-15 12:57         ` Jinyang He
2023-10-15 13:57           ` Huacai Chen
2023-10-17 12:44             ` Tiezhu Yang
2023-10-17 12:39           ` Tiezhu Yang
2023-10-17 12:37         ` Tiezhu Yang
2023-10-14 11:40   ` Huacai Chen
2023-10-17 12:33     ` Tiezhu Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®