elf: add Elf64_Sym
authorKaDiWa <kalle.wachsmuth@gmail.com>
Sun, 22 Jan 2023 19:04:53 +0000 (20:04 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 6 Feb 2023 18:04:52 +0000 (13:04 -0500)
Required as Elf_Sym in tools/prelink-riscv.inc. I assume people have
been using an OS-supplied elf.h, but macOS doesn't have that.

Taken from
https://github.com/torvalds/linux/blob/v6.1/include/uapi/linux/elf.h

Signed-off-by: KaDiWa <kalle.wachsmuth@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/elf.h

index aeda159..a4ba74d 100644 (file)
@@ -360,6 +360,15 @@ typedef struct {
        Elf32_Half      st_shndx;       /* section header index */
 } Elf32_Sym;
 
+typedef struct {
+       Elf64_Word      st_name;        /* name - index into string table */
+       unsigned char   st_info;        /* type and binding */
+       unsigned char   st_other;       /* 0 - no defined meaning */
+       Elf64_Half      st_shndx;       /* section header index */
+       Elf64_Addr      st_value;       /* symbol value */
+       Elf64_Xword     st_size;        /* symbol size */
+} Elf64_Sym;
+
 /* Symbol table index */
 #define STN_UNDEF      0               /* undefined */