Introduction
Introduction Statistics Contact Development Disclaimer Help
libmach/elf: Add elfrel.h - scc - simple c99 compiler
git clone git://git.simple-cc.org/scc
Log
Files
Refs
Submodules
README
LICENSE
---
commit 21df8da7aed52515d5149538a9a1c5d622e4a166
parent e776065632d998cb8491dded4d3c809ac272f5fc
Author: Roberto E. Vargas Caballero <[email protected]>
Date: Thu, 20 Feb 2025 11:39:30 +0100
libmach/elf: Add elfrel.h
This file was missed in a previous commit and the build was broken
but it was not catched by the developer builds.
Diffstat:
A include/bits/scc/elf/elfrel.h | 39 +++++++++++++++++++++++++++++…
1 file changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/include/bits/scc/elf/elfrel.h b/include/bits/scc/elf/elfrel.h
@@ -0,0 +1,39 @@
+/* See http://www.sco.com/developers/gabi/latest/contents.html */
+
+/* Relocation definitions */
+
+typedef struct {
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+} Elf32_Rel;
+
+typedef struct {
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+typedef struct {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+} Elf64_Rel;
+
+typedef struct {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+ Elf64_Sxword r_addend;
+} Elf64_Rela;
+
+#define ELFR32SZ 8
+#define ELFRA32SZ 12
+
+#define ELFR64SZ 16
+#define ELFRA64SZ 24
+
+#define ELF32_R_SYM(i) ((i)>>8)
+#define ELF32_R_TYPE(i) ((unsigned char)(i))
+#define ELF32_R_INFO(s,t) (((s)<<8)+(unsigned char)(t))
+
+#define ELF64_R_SYM(i) ((i)>>32)
+#define ELF64_R_TYPE(i) ((i)&0xffffffffL)
+#define ELF64_R_INFO(s,t) (((s)<<32)+((t)&0xffffffffL))
You are viewing proxied material from simple-cc.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.