提交 23a7aea5 编写于 作者: R Rolf Eike Beer 提交者: Kees Cook

ELF uapi: add spaces before '{'

When searching for a struct definition I often enough end up simply doing

  git grep 'struct foobar {'

Sadly some of the ELF structs did not follow the usual coding style so they
were invisible.
Signed-off-by: NRolf Eike Beer <eb@emlix.com>
Signed-off-by: NKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/11563980.Ss37MnutNL@mobilepool36.emlix.com
上级 af4fddff
...@@ -140,9 +140,9 @@ typedef __s64 Elf64_Sxword; ...@@ -140,9 +140,9 @@ typedef __s64 Elf64_Sxword;
#define ELF64_ST_BIND(x) ELF_ST_BIND(x) #define ELF64_ST_BIND(x) ELF_ST_BIND(x)
#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x) #define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
typedef struct dynamic{ typedef struct dynamic {
Elf32_Sword d_tag; Elf32_Sword d_tag;
union{ union {
Elf32_Sword d_val; Elf32_Sword d_val;
Elf32_Addr d_ptr; Elf32_Addr d_ptr;
} d_un; } d_un;
...@@ -173,7 +173,7 @@ typedef struct elf64_rel { ...@@ -173,7 +173,7 @@ typedef struct elf64_rel {
Elf64_Xword r_info; /* index and type of relocation */ Elf64_Xword r_info; /* index and type of relocation */
} Elf64_Rel; } Elf64_Rel;
typedef struct elf32_rela{ typedef struct elf32_rela {
Elf32_Addr r_offset; Elf32_Addr r_offset;
Elf32_Word r_info; Elf32_Word r_info;
Elf32_Sword r_addend; Elf32_Sword r_addend;
...@@ -185,7 +185,7 @@ typedef struct elf64_rela { ...@@ -185,7 +185,7 @@ typedef struct elf64_rela {
Elf64_Sxword r_addend; /* Constant addend used to compute value */ Elf64_Sxword r_addend; /* Constant addend used to compute value */
} Elf64_Rela; } Elf64_Rela;
typedef struct elf32_sym{ typedef struct elf32_sym {
Elf32_Word st_name; Elf32_Word st_name;
Elf32_Addr st_value; Elf32_Addr st_value;
Elf32_Word st_size; Elf32_Word st_size;
...@@ -206,7 +206,7 @@ typedef struct elf64_sym { ...@@ -206,7 +206,7 @@ typedef struct elf64_sym {
#define EI_NIDENT 16 #define EI_NIDENT 16
typedef struct elf32_hdr{ typedef struct elf32_hdr {
unsigned char e_ident[EI_NIDENT]; unsigned char e_ident[EI_NIDENT];
Elf32_Half e_type; Elf32_Half e_type;
Elf32_Half e_machine; Elf32_Half e_machine;
...@@ -246,7 +246,7 @@ typedef struct elf64_hdr { ...@@ -246,7 +246,7 @@ typedef struct elf64_hdr {
#define PF_W 0x2 #define PF_W 0x2
#define PF_X 0x1 #define PF_X 0x1
typedef struct elf32_phdr{ typedef struct elf32_phdr {
Elf32_Word p_type; Elf32_Word p_type;
Elf32_Off p_offset; Elf32_Off p_offset;
Elf32_Addr p_vaddr; Elf32_Addr p_vaddr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册