* riscv64-pei uninitialised data writing relocs
@ 2024-01-24 23:38 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2024-01-24 23:38 UTC (permalink / raw)
To: binutils
Without this patch the r_offset field of struct external_reloc is
uninitialised when using objcopy.
Please note that riscv64-pei is only useful for obcopy, objump, nm and
the other tools in the binutils directory. gas and ld are not
supported.
* coff/riscv64.h (SWAP_IN_RELOC_OFFSET): Define.
(SWAP_OUT_RELOC_OFFSET): Define.
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 */
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-24 23:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 23:38 riscv64-pei uninitialised data writing relocs Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).