summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-07-27 12:29:14 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-07-27 12:29:14 -0700
commitbf743092cd19dea323238a06420150f10fb4ca3d (patch)
tree7b5e05fe052e9eec353425d2dca4c059a48bfcd9
parent386ca9893ba0d35a34069c2fec3d59185691fd0e (diff)
downloadsamples-bf743092cd19dea323238a06420150f10fb4ca3d.tar.gz
samples-bf743092cd19dea323238a06420150f10fb4ca3d.tar.xz
samples-bf743092cd19dea323238a06420150f10fb4ca3d.zip
exe.ld: document why PSP is at 0xfff00 instead of -256
-rw-r--r--exe.ld8
1 files changed, 8 insertions, 0 deletions
diff --git a/exe.ld b/exe.ld
index e0c2f37..d34af70 100644
--- a/exe.ld
+++ b/exe.ld
@@ -3,6 +3,14 @@ OUTPUT_ARCH(i386)
ENTRY(__start)
SECTIONS
{
+ /*
+ * The PSP is really at offset -256, but that drives the
+ * current version of ld crazy. Doing it this way is OK *if
+ * and only if* we don't care about 32-bit (R_386_32)
+ * relocations producing correct results. Pure MZ EXE files
+ * don't support 32-bit relocations anyway, so this is OK for
+ * now.
+ */
_PSP 0xfff00 (NOLOAD) : {
PROVIDE(__psp! = .);
PROVIDE(__psp = .);