aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaDiWa2023-01-22 20:04:53 +0100
committerTom Rini2023-02-06 13:04:52 -0500
commit4209c4736475de4186dc1006d3b929a51b664f73 (patch)
treefb18145c0cf0a5c251f70ed06654e9636e8aa991
parent748c1ab464852eaca06a57af067565e73223e7bb (diff)
elf: add Elf64_Sym
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>
-rw-r--r--include/elf.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h
index aeda159f0c0..a4ba74d8abe 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -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 */