[binutils-gdb] riscv64-pei uninitialised data writing relocs
Alan Modra
amodra@sourceware.org
Wed Jan 24 23:39:17 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8df52f1a5213ca05ad0c9979d19bd85cef310c98
commit 8df52f1a5213ca05ad0c9979d19bd85cef310c98
Author: Alan Modra <amodra@gmail.com>
Date: Thu Jan 25 08:41:14 2024 +1030
riscv64-pei uninitialised data writing relocs
Without this patch the r_offset field of struct external_reloc is
uninitialised when using objcopy.
* coff/riscv64.h (SWAP_IN_RELOC_OFFSET): Define.
(SWAP_OUT_RELOC_OFFSET): Define.
Diff:
---
include/coff/riscv64.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/coff/riscv64.h b/include/coff/riscv64.h
index 1a1d6f37c7d..dfff497bc1b 100644
--- a/include/coff/riscv64.h
+++ b/include/coff/riscv64.h
@@ -60,5 +60,7 @@ struct external_reloc
#define RELOC struct external_reloc
#define RELSZ 14
+#define SWAP_IN_RELOC_OFFSET H_GET_32
+#define SWAP_OUT_RELOC_OFFSET H_PUT_32
#endif /* COFF_RISCV64_H */
More information about the Binutils-cvs
mailing list