some progress

This commit is contained in:
veclavtlica
2026-10-07 11:21:21 +03:00
parent 14062e9d00
commit 8d502173a2
26 changed files with 705 additions and 212 deletions
+48
View File
@@ -0,0 +1,48 @@
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
PHDRS
{
text PT_LOAD FLAGS(5); /* RX: Read/Execute */
}
SECTIONS
{
PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000));
. = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
.text ALIGN(16) : {
*(.text*)
}
.rodata : {
*(.rodata*)
}
.data : {
*(.data*)
}
.bss : {
*(.bss*)
*(COMMON)
}
/* Discard bloat and unnecessary ELF sections */
/DISCARD/ : {
*(.note.GNU-stack)
*(.gnu_debuglink)
*(.gnu.lto_*)
*(.note.gnu.build-id)
*(.eh_frame_hdr)
*(.eh_frame_entry)
*(.eh_frame)
*(.comment)
*(.interp)
*(.dynsym)
*(.dynstr)
*(.hash)
*(.gnu.hash)
}
}