some progress
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user