[CRIU] [PATCH 06/11] compel: scripts -- Rework packing script

Cyrill Gorcunov gorcunov at openvz.org
Fri Nov 11 10:52:03 PST 2016


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 compel/arch/aarch64/scripts/compel-pack.lds.S    | 32 ++++++++++++++++++++
 compel/arch/arm/scripts/compel-pack.lds.S        | 32 ++++++++++++++++++++
 compel/arch/ppc64/scripts/compel-pack.lds.S      | 36 +++++++++++++++++++++++
 compel/arch/x86/scripts/compel-pack-compat.lds.S | 37 ++++++++++++++++++++++++
 compel/arch/x86/scripts/compel-pack.lds.S        | 37 ++++++++++++++++++++++++
 compel/arch/x86/scripts/pack.lds.S               | 30 -------------------
 6 files changed, 174 insertions(+), 30 deletions(-)
 create mode 100644 compel/arch/aarch64/scripts/compel-pack.lds.S
 create mode 100644 compel/arch/arm/scripts/compel-pack.lds.S
 create mode 100644 compel/arch/ppc64/scripts/compel-pack.lds.S
 create mode 100644 compel/arch/x86/scripts/compel-pack-compat.lds.S
 create mode 100644 compel/arch/x86/scripts/compel-pack.lds.S
 delete mode 100644 compel/arch/x86/scripts/pack.lds.S

diff --git a/compel/arch/aarch64/scripts/compel-pack.lds.S b/compel/arch/aarch64/scripts/compel-pack.lds.S
new file mode 100644
index 000000000000..b07e68c1d905
--- /dev/null
+++ b/compel/arch/aarch64/scripts/compel-pack.lds.S
@@ -0,0 +1,32 @@
+OUTPUT_ARCH(aarch64)
+SECTIONS
+{
+	.crblob 0x0 : {
+		*(.head.text)
+		*(.text*)
+		. = ALIGN(32);
+		*(.data*)
+		. = ALIGN(32);
+		*(.rodata*)
+		. = ALIGN(32);
+		*(.bss*)
+		. = ALIGN(32);
+		*(.got*)
+		. = ALIGN(32);
+		*(.toc*)
+		. = ALIGN(32);
+	} =0x00000000,
+
+	/DISCARD/ : {
+		*(.debug*)
+		*(.comment*)
+		*(.note*)
+		*(.group*)
+		*(.eh_frame*)
+		*(*)
+	}
+
+/* Parasite args should have 4 bytes align, as we have futex inside. */
+. = ALIGN(4);
+__export_parasite_args = .;
+}
diff --git a/compel/arch/arm/scripts/compel-pack.lds.S b/compel/arch/arm/scripts/compel-pack.lds.S
new file mode 100644
index 000000000000..fe402787f6fc
--- /dev/null
+++ b/compel/arch/arm/scripts/compel-pack.lds.S
@@ -0,0 +1,32 @@
+OUTPUT_ARCH(arm)
+SECTIONS
+{
+	.crblob 0x0 : {
+		*(.head.text)
+		*(.text*)
+		. = ALIGN(32);
+		*(.data*)
+		. = ALIGN(32);
+		*(.rodata*)
+		. = ALIGN(32);
+		*(.bss*)
+		. = ALIGN(32);
+		*(.got*)
+		. = ALIGN(32);
+		*(.toc*)
+		. = ALIGN(32);
+	} =0x00000000,
+
+	/DISCARD/ : {
+		*(.debug*)
+		*(.comment*)
+		*(.note*)
+		*(.group*)
+		*(.eh_frame*)
+		*(*)
+	}
+
+/* Parasite args should have 4 bytes align, as we have futex inside. */
+. = ALIGN(4);
+__export_parasite_args = .;
+}
diff --git a/compel/arch/ppc64/scripts/compel-pack.lds.S b/compel/arch/ppc64/scripts/compel-pack.lds.S
new file mode 100644
index 000000000000..5da9a08460c6
--- /dev/null
+++ b/compel/arch/ppc64/scripts/compel-pack.lds.S
@@ -0,0 +1,36 @@
+OUTPUT_ARCH(powerpc:common64)
+SECTIONS
+{
+	.text : {
+		*(.head.text)
+		*(.text*)
+		*(.compel.exit)
+		*(.compel.init)
+	}
+
+	.data : {
+		*(.data*)
+		*(.bss*)
+	}
+
+	.rodata : {
+		*(.rodata*)
+		*(.got*)
+	}
+
+	.toc : ALIGN(8) {
+		*(.toc*)
+	}
+
+	/DISCARD/ : {
+		*(.debug*)
+		*(.comment*)
+		*(.note*)
+		*(.group*)
+		*(.eh_frame*)
+	}
+
+/* Parasite args should have 4 bytes align, as we have futex inside. */
+. = ALIGN(4);
+__export_parasite_args = .;
+}
diff --git a/compel/arch/x86/scripts/compel-pack-compat.lds.S b/compel/arch/x86/scripts/compel-pack-compat.lds.S
new file mode 100644
index 000000000000..67adf96a0aaa
--- /dev/null
+++ b/compel/arch/x86/scripts/compel-pack-compat.lds.S
@@ -0,0 +1,37 @@
+OUTPUT_ARCH(i386)
+TARGET(elf32-i386)
+SECTIONS
+{
+	.text : {
+		*(.head.text)
+		*(.text*)
+		*(.compel.exit)
+		*(.compel.init)
+	}
+
+	.data : {
+		*(.data*)
+		*(.bss*)
+	}
+
+	.rodata : {
+		*(.rodata*)
+		*(.got*)
+	}
+
+	.toc : ALIGN(8) {
+		*(.toc*)
+	}
+
+	/DISCARD/ : {
+		*(.debug*)
+		*(.comment*)
+		*(.note*)
+		*(.group*)
+		*(.eh_frame*)
+	}
+
+/* Parasite args should have 4 bytes align, as we have futex inside. */
+. = ALIGN(4);
+__export_parasite_args = .;
+}
diff --git a/compel/arch/x86/scripts/compel-pack.lds.S b/compel/arch/x86/scripts/compel-pack.lds.S
new file mode 100644
index 000000000000..cd6584ffe710
--- /dev/null
+++ b/compel/arch/x86/scripts/compel-pack.lds.S
@@ -0,0 +1,37 @@
+OUTPUT_ARCH(i386:x86-64)
+TARGET(elf64-x86-64)
+SECTIONS
+{
+	.text : {
+		*(.head.text)
+		*(.text*)
+		*(.compel.exit)
+		*(.compel.init)
+	}
+
+	.data : {
+		*(.data*)
+		*(.bss*)
+	}
+
+	.rodata : {
+		*(.rodata*)
+		*(.got*)
+	}
+
+	.toc : ALIGN(8) {
+		*(.toc*)
+	}
+
+	/DISCARD/ : {
+		*(.debug*)
+		*(.comment*)
+		*(.note*)
+		*(.group*)
+		*(.eh_frame*)
+	}
+
+/* Parasite args should have 4 bytes align, as we have futex inside. */
+. = ALIGN(4);
+__export_parasite_args = .;
+}
diff --git a/compel/arch/x86/scripts/pack.lds.S b/compel/arch/x86/scripts/pack.lds.S
deleted file mode 100644
index 3b94b3ecd2f2..000000000000
--- a/compel/arch/x86/scripts/pack.lds.S
+++ /dev/null
@@ -1,30 +0,0 @@
-OUTPUT_ARCH(i386:x86-64)
-SECTIONS
-{
-	. = ALIGN(64);
-	.text : {
-		*(.compel.prologue.text)
-		*(.text*)
-	} =0x0
-
-	. = ALIGN(64);
-	.compel.init : {
-		*(.compel.init)
-	} =0xff
-
-	. = ALIGN(64);
-	.data : {
-		*(.data*)
-		*(.bss*)
-		*(.rodata*)
-	} =0x0
-
-	/DISCARD/ : {
-		*(.debug*)
-		*(.comment*)
-		*(.note*)
-		*(.group*)
-		*(.eh_frame*)
-		*(*)
-	}
-}
-- 
2.7.4



More information about the CRIU mailing list