Skip to content

Commit c6cae1b

Browse files
author
Fox Snowpatch
committed
1 parent 4db4221 commit c6cae1b

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

arch/Kconfig

+9
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,15 @@ config MMU_LAZY_TLB_SHOOTDOWN
502502
config ARCH_HAVE_NMI_SAFE_CMPXCHG
503503
bool
504504

505+
config ARCH_HAVE_EXTRA_ELF_NOTES
506+
bool
507+
help
508+
An architecture should select this in order to enable adding an
509+
arch-specific ELF note section to core files. It must provide two
510+
functions: elf_coredump_extra_notes_size() and
511+
elf_coredump_extra_notes_write() which are invoked by the ELF core
512+
dumper.
513+
505514
config ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
506515
bool
507516

arch/powerpc/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ config PPC
156156
select ARCH_HAS_UACCESS_FLUSHCACHE
157157
select ARCH_HAS_UBSAN
158158
select ARCH_HAVE_NMI_SAFE_CMPXCHG
159+
select ARCH_HAVE_EXTRA_ELF_NOTES if SPU_BASE
159160
select ARCH_KEEP_MEMBLOCK
160161
select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE if PPC_RADIX_MMU
161162
select ARCH_MIGHT_HAVE_PC_PARPORT

arch/powerpc/include/asm/elf.h

-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
127127
/* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
128128
#define NT_SPU 1
129129

130-
#define ARCH_HAVE_EXTRA_ELF_NOTES
131-
132130
#endif /* CONFIG_SPU_BASE */
133131

134132
#ifdef CONFIG_PPC64

include/linux/elf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extern Elf64_Dyn _DYNAMIC [];
6565
struct file;
6666
struct coredump_params;
6767

68-
#ifndef ARCH_HAVE_EXTRA_ELF_NOTES
68+
#ifndef CONFIG_ARCH_HAVE_EXTRA_ELF_NOTES
6969
static inline int elf_coredump_extra_notes_size(void) { return 0; }
7070
static inline int elf_coredump_extra_notes_write(struct coredump_params *cprm) { return 0; }
7171
#else

0 commit comments

Comments
 (0)