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:
Cyrill Gorcunov 2016-11-11 21:52:00 +03:00 committed by Andrei Vagin
parent 6d5a8930a9
commit 0be8beb666
6 changed files with 174 additions and 30 deletions

View 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 = .;
}

View 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 = .;
}

View 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 = .;
}

View 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 = .;
}

View 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 = .;
}

View file

@ -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*)
*(*)
}
}