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 000000000..b07e68c1d --- /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 000000000..fe402787f --- /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 000000000..5da9a0846 --- /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 000000000..67adf96a0 --- /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 000000000..cd6584ffe --- /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 3b94b3ecd..000000000 --- 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*) - *(*) - } -}