summaryrefslogtreecommitdiff
path: root/src/user-elf.ld
diff options
context:
space:
mode:
Diffstat (limited to 'src/user-elf.ld')
-rw-r--r--src/user-elf.ld26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/user-elf.ld b/src/user-elf.ld
new file mode 100644
index 0000000..8b0c102
--- /dev/null
+++ b/src/user-elf.ld
@@ -0,0 +1,26 @@
+OUTPUT_FORMAT(elf32-i386)
+OUTPUT_ARCH(i386)
+
+SECTIONS {
+ .ple_head : {
+ /*magic*/ LONG(0xb9ba4c50)
+ /*version*/ LONG(0x00000000)
+ /*payload offset*/ LONG(SIZEOF(.ple_head))
+ /*payload length*/ LONG(__pl_length)
+ /*bss length*/ LONG(SIZEOF(.bss))
+ /*entry point*/ LONG(_entry)
+ }
+ .text 0 : AT(SIZEOF(.ple_head)) {
+ *(.text)
+ }
+ .rodata : {
+ *(.rodata)
+ }
+ .data : {
+ *(.data)
+ __pl_length = .;
+ }
+ .bss ALIGN(0) : {
+ *(.bss)
+ }
+} \ No newline at end of file