~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/genelf.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/perf/util/genelf.h (Version linux-6.11.5) and /tools/perf/util/genelf.h (Version linux-5.5.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __GENELF_H__                                2 #ifndef __GENELF_H__
  3 #define __GENELF_H__                                3 #define __GENELF_H__
  4                                                     4 
  5 #include <linux/math.h>                        << 
  6                                                << 
  7 /* genelf.c */                                      5 /* genelf.c */
  8 int jit_write_elf(int fd, uint64_t code_addr,       6 int jit_write_elf(int fd, uint64_t code_addr, const char *sym,
  9                   const void *code, int csize,      7                   const void *code, int csize, void *debug, int nr_debug_entries,
 10                   void *unwinding, uint64_t un      8                   void *unwinding, uint64_t unwinding_header_size, uint64_t unwinding_size);
 11 #ifdef HAVE_DWARF_SUPPORT                           9 #ifdef HAVE_DWARF_SUPPORT
 12 /* genelf_debug.c */                               10 /* genelf_debug.c */
 13 int jit_add_debug_info(Elf *e, uint64_t code_a     11 int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_entries);
 14 #endif                                             12 #endif
 15                                                    13 
 16 #if   defined(__arm__)                             14 #if   defined(__arm__)
 17 #define GEN_ELF_ARCH    EM_ARM                     15 #define GEN_ELF_ARCH    EM_ARM
 18 #define GEN_ELF_CLASS   ELFCLASS32                 16 #define GEN_ELF_CLASS   ELFCLASS32
 19 #elif defined(__aarch64__)                         17 #elif defined(__aarch64__)
 20 #define GEN_ELF_ARCH    EM_AARCH64                 18 #define GEN_ELF_ARCH    EM_AARCH64
 21 #define GEN_ELF_CLASS   ELFCLASS64                 19 #define GEN_ELF_CLASS   ELFCLASS64
 22 #elif defined(__x86_64__)                          20 #elif defined(__x86_64__)
 23 #define GEN_ELF_ARCH    EM_X86_64                  21 #define GEN_ELF_ARCH    EM_X86_64
 24 #define GEN_ELF_CLASS   ELFCLASS64                 22 #define GEN_ELF_CLASS   ELFCLASS64
 25 #elif defined(__i386__)                            23 #elif defined(__i386__)
 26 #define GEN_ELF_ARCH    EM_386                     24 #define GEN_ELF_ARCH    EM_386
 27 #define GEN_ELF_CLASS   ELFCLASS32                 25 #define GEN_ELF_CLASS   ELFCLASS32
 28 #elif defined(__powerpc64__)                       26 #elif defined(__powerpc64__)
 29 #define GEN_ELF_ARCH    EM_PPC64                   27 #define GEN_ELF_ARCH    EM_PPC64
 30 #define GEN_ELF_CLASS   ELFCLASS64                 28 #define GEN_ELF_CLASS   ELFCLASS64
 31 #elif defined(__powerpc__)                         29 #elif defined(__powerpc__)
 32 #define GEN_ELF_ARCH    EM_PPC                     30 #define GEN_ELF_ARCH    EM_PPC
 33 #define GEN_ELF_CLASS   ELFCLASS32                 31 #define GEN_ELF_CLASS   ELFCLASS32
 34 #elif defined(__sparc__) && defined(__arch64__     32 #elif defined(__sparc__) && defined(__arch64__)
 35 #define GEN_ELF_ARCH    EM_SPARCV9                 33 #define GEN_ELF_ARCH    EM_SPARCV9
 36 #define GEN_ELF_CLASS   ELFCLASS64                 34 #define GEN_ELF_CLASS   ELFCLASS64
 37 #elif defined(__sparc__)                           35 #elif defined(__sparc__)
 38 #define GEN_ELF_ARCH    EM_SPARC                   36 #define GEN_ELF_ARCH    EM_SPARC
 39 #define GEN_ELF_CLASS   ELFCLASS32                 37 #define GEN_ELF_CLASS   ELFCLASS32
 40 #elif defined(__s390x__)                           38 #elif defined(__s390x__)
 41 #define GEN_ELF_ARCH    EM_S390                    39 #define GEN_ELF_ARCH    EM_S390
 42 #define GEN_ELF_CLASS   ELFCLASS64                 40 #define GEN_ELF_CLASS   ELFCLASS64
 43 #elif defined(__riscv) && __riscv_xlen == 64   << 
 44 #define GEN_ELF_ARCH    EM_RISCV               << 
 45 #define GEN_ELF_CLASS   ELFCLASS64             << 
 46 #elif defined(__riscv) && __riscv_xlen == 32   << 
 47 #define GEN_ELF_ARCH    EM_RISCV               << 
 48 #define GEN_ELF_CLASS   ELFCLASS32             << 
 49 #elif defined(__loongarch__)                   << 
 50 #define GEN_ELF_ARCH    EM_LOONGARCH           << 
 51 #define GEN_ELF_CLASS   ELFCLASS64             << 
 52 #else                                              41 #else
 53 #error "unsupported architecture"                  42 #error "unsupported architecture"
 54 #endif                                             43 #endif
 55                                                    44 
 56 #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__     !!  45 #if __BYTE_ORDER == __BIG_ENDIAN
 57 #define GEN_ELF_ENDIAN  ELFDATA2MSB                46 #define GEN_ELF_ENDIAN  ELFDATA2MSB
 58 #else                                              47 #else
 59 #define GEN_ELF_ENDIAN  ELFDATA2LSB                48 #define GEN_ELF_ENDIAN  ELFDATA2LSB
 60 #endif                                             49 #endif
 61                                                    50 
 62 #if GEN_ELF_CLASS == ELFCLASS64                    51 #if GEN_ELF_CLASS == ELFCLASS64
 63 #define elf_newehdr     elf64_newehdr              52 #define elf_newehdr     elf64_newehdr
 64 #define elf_newphdr     elf64_newphdr          << 
 65 #define elf_getshdr     elf64_getshdr              53 #define elf_getshdr     elf64_getshdr
 66 #define Elf_Ehdr        Elf64_Ehdr                 54 #define Elf_Ehdr        Elf64_Ehdr
 67 #define Elf_Phdr        Elf64_Phdr             << 
 68 #define Elf_Shdr        Elf64_Shdr                 55 #define Elf_Shdr        Elf64_Shdr
 69 #define Elf_Sym         Elf64_Sym                  56 #define Elf_Sym         Elf64_Sym
 70 #define ELF_ST_TYPE(a)  ELF64_ST_TYPE(a)           57 #define ELF_ST_TYPE(a)  ELF64_ST_TYPE(a)
 71 #define ELF_ST_BIND(a)  ELF64_ST_BIND(a)           58 #define ELF_ST_BIND(a)  ELF64_ST_BIND(a)
 72 #define ELF_ST_VIS(a)   ELF64_ST_VISIBILITY(a)     59 #define ELF_ST_VIS(a)   ELF64_ST_VISIBILITY(a)
 73 #else                                              60 #else
 74 #define elf_newehdr     elf32_newehdr              61 #define elf_newehdr     elf32_newehdr
 75 #define elf_newphdr     elf32_newphdr          << 
 76 #define elf_getshdr     elf32_getshdr              62 #define elf_getshdr     elf32_getshdr
 77 #define Elf_Ehdr        Elf32_Ehdr                 63 #define Elf_Ehdr        Elf32_Ehdr
 78 #define Elf_Phdr        Elf32_Phdr             << 
 79 #define Elf_Shdr        Elf32_Shdr                 64 #define Elf_Shdr        Elf32_Shdr
 80 #define Elf_Sym         Elf32_Sym                  65 #define Elf_Sym         Elf32_Sym
 81 #define ELF_ST_TYPE(a)  ELF32_ST_TYPE(a)           66 #define ELF_ST_TYPE(a)  ELF32_ST_TYPE(a)
 82 #define ELF_ST_BIND(a)  ELF32_ST_BIND(a)           67 #define ELF_ST_BIND(a)  ELF32_ST_BIND(a)
 83 #define ELF_ST_VIS(a)   ELF32_ST_VISIBILITY(a)     68 #define ELF_ST_VIS(a)   ELF32_ST_VISIBILITY(a)
 84 #endif                                             69 #endif
 85                                                    70 
 86 /* The .text section is directly after the ELF     71 /* The .text section is directly after the ELF header */
 87 #define GEN_ELF_TEXT_OFFSET round_up(sizeof(El !!  72 #define GEN_ELF_TEXT_OFFSET sizeof(Elf_Ehdr)
 88                                                    73 
 89 #endif                                             74 #endif
 90                                                    75 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php