forked from UnmappedStack/SpecOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make stack trace print function names
- Loading branch information
jakeSteinburger
committed
Jul 28, 2024
1 parent
feb0e13
commit 947f522
Showing
8 changed files
with
134 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,45 @@ | ||
/* Tell the linker that we want an x86_64 ELF64 output file */ | ||
OUTPUT_FORMAT(elf64-x86-64) | ||
OUTPUT_ARCH(i386:x86-64) | ||
|
||
/* We want the symbol _start to be our entry point */ | ||
ENTRY(_start) | ||
PHDRS | ||
{ | ||
text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */ | ||
rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */ | ||
data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */ | ||
dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; /* Dynamic PHDR for relocations */ | ||
} | ||
|
||
SECTIONS | ||
{ | ||
/* We want to be placed in the topmost 2GiB of the address space, for optimisations */ | ||
/* and because that is what the Limine spec mandates. */ | ||
/* Any address in this region will do, but often 0xffffffff80000000 is chosen as */ | ||
/* that is the beginning of the region. */ | ||
/* Additionally, leave space for the ELF headers by adding SIZEOF_HEADERS to the */ | ||
/* base load address. */ | ||
. = 0xffffffff80000000 + SIZEOF_HEADERS; | ||
.rodata ALIGN(CONSTANT(MAXPAGESIZE)) : { | ||
*(.rodata .rodata.*) | ||
} | ||
. = 0xffffffff80000000; | ||
|
||
.text ALIGN(CONSTANT(MAXPAGESIZE)) : { | ||
.text : { | ||
*(.text .text.*) | ||
} | ||
} :text | ||
|
||
.data ALIGN(CONSTANT(MAXPAGESIZE)) : { | ||
*(.data .data.*) | ||
. += CONSTANT(MAXPAGESIZE); | ||
|
||
/* Place the sections that contain the Limine requests as part of the .data */ | ||
/* output section. */ | ||
KEEP(*(.requests_start_marker)) | ||
KEEP(*(.requests)) | ||
KEEP(*(.requests_end_marker)) | ||
} | ||
.rodata : { | ||
*(.rodata .rodata.*) | ||
} :rodata | ||
|
||
. += CONSTANT(MAXPAGESIZE); | ||
|
||
.data : { | ||
*(.data .data.*) | ||
} :data | ||
|
||
/* Dynamic section for relocations and other PIE related information. */ | ||
.dynamic : { | ||
*(.dynamic) | ||
} | ||
} :data :dynamic | ||
|
||
/* NOTE: .bss needs to be the last thing mapped to the data PHDR, otherwise lots of */ | ||
/* unnecessary zeros will be written to the binary. */ | ||
/* If you need, for example, .init_array and .fini_array, those should be placed */ | ||
/* above this. */ | ||
.bss ALIGN(CONSTANT(MAXPAGESIZE)) : { | ||
.bss : { | ||
*(.bss .bss.*) | ||
*(COMMON) | ||
} | ||
|
||
/* Discard the program interpreter section since we do not need one. This is */ | ||
/* more or less equivalent to the --no-dynamic-linker linker flag, except that it */ | ||
/* works with ld.gold. */ | ||
} :data | ||
/DISCARD/ : { | ||
*(.interp) | ||
*(.eh_frame) | ||
*(.note .note.*) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters