mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-29 04:50:26 +00:00
compel: Add lds scripts for PIE code
In CRIU these are auto-generated, we want to have them in compel and it looks like it's better to have them fixed rather than generated. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
6d5a8930a9
commit
0be8beb666
6 changed files with 174 additions and 30 deletions
32
compel/arch/aarch64/scripts/compel-pack.lds.S
Normal file
32
compel/arch/aarch64/scripts/compel-pack.lds.S
Normal file
|
|
@ -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 = .;
|
||||
}
|
||||
32
compel/arch/arm/scripts/compel-pack.lds.S
Normal file
32
compel/arch/arm/scripts/compel-pack.lds.S
Normal file
|
|
@ -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 = .;
|
||||
}
|
||||
36
compel/arch/ppc64/scripts/compel-pack.lds.S
Normal file
36
compel/arch/ppc64/scripts/compel-pack.lds.S
Normal file
|
|
@ -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 = .;
|
||||
}
|
||||
37
compel/arch/x86/scripts/compel-pack-compat.lds.S
Normal file
37
compel/arch/x86/scripts/compel-pack-compat.lds.S
Normal file
|
|
@ -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 = .;
|
||||
}
|
||||
37
compel/arch/x86/scripts/compel-pack.lds.S
Normal file
37
compel/arch/x86/scripts/compel-pack.lds.S
Normal file
|
|
@ -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 = .;
|
||||
}
|
||||
|
|
@ -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*)
|
||||
*(*)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue