ELF uapi: add spaces before '{'
Subsystems (2)
PATCH 1/1 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.
--- include/uapi/linux/elf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
include/uapi/linux/elf.h +6 -6
@@ -140,9 +140,9 @@ typedef __s64 Elf64_Sxword;#define ELF64_ST_BIND (x) ELF_ST_BIND(x)#define ELF64_ST_TYPE (x) ELF_ST_TYPE(x) -typedef struct dynamic{ +typedef struct dynamic { Elf32_Sword d_tag; - union{ + union { Elf32_Sword d_val; Elf32_Addr d_ptr; } d_un;
@@ -173,7 +173,7 @@ typedef struct elf64_rel {Elf64_Xword r_info;/* index and type of relocation */ } Elf64_Rel; -typedef struct elf32_rela{ +typedef struct elf32_rela { Elf32_Addr r_offset; Elf32_Word r_info; Elf32_Sword r_addend;
@@ -185,7 +185,7 @@ typedef struct elf64_rela {Elf64_Sxword r_addend;/* Constant addend used to compute value */ } Elf64_Rela; -typedef struct elf32_sym{ +typedef struct elf32_sym { Elf32_Word st_name; Elf32_Addr st_value; Elf32_Word st_size;
@@ -206,7 +206,7 @@ typedef struct elf64_sym {#define EI_NIDENT 16 -typedef struct elf32_hdr{ +typedef struct elf32_hdr { unsigned char e_ident[EI_NIDENT]; Elf32_Half e_type; Elf32_Half e_machine;
@@ -246,7 +246,7 @@ typedef struct elf64_hdr {#define PF_W 0x2#define PF_X 0x1 -typedef struct elf32_phdr{ +typedef struct elf32_phdr { Elf32_Word p_type; Elf32_Off p_offset; Elf32_Addr p_vaddr;
Signature · 11 lines
2.37.3 -- Rolf Eike Beer, emlix GmbH, https://www.emlix.com Fon +49 551 30664-0, Fax +49 551 30664-11 Gothaer Platz 3, 37083 Göttingen, Germany Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160 Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055 emlix - smart embedded open source
Quoted 6 lines · Rolf Eike Beer
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.
Thanks! Yes, I do the same. :)
I'll get this into -next after the merge window closes.
-Kees
Signature · 1 line
Kees Cook
Kees Cook
AppliedQuoted 8 lines · Rolf Eike Beer
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.
[...]
Applied to for-next/execve, thanks!
[1/1] ELF uapi: add spaces before '{'
https://git.kernel.org/kees/c/5ce85ed9d20e
Signature · 1 line
Kees Cook