[Nasm-bugs] [Bug 3392533] Considerations for segment support in ELF

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Tue Jul 16 08:49:08 PDT 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392533

--- Comment #30 from TK Chia <u1049321969 at caramail.com> ---
Hello stsp,

Does it work better if you adjust the sections' load addresses so that they
coincide with their absolute addresses in conventional memory?  I do not really
have a working dosemu2 setup at the moment, so I have not been able to really
test this.

======
diff --git a/fdpp/kernel.ld b/fdpp/kernel.ld
index 143afe8..deff9cc 100644
--- a/fdpp/kernel.ld
+++ b/fdpp/kernel.ld
@@ -6,19 +6,19 @@ DOS_PSP = 0x60;
 MEMOFS = DOS_PSP * 16;

 /* these GROUPs play the same role as GROUPS (segments) in OMF */
-PGROUP = (MEMOFS + LOADADDR(.ptext)) / 16;
-LGROUP = (MEMOFS + LOADADDR(.ltext)) / 16;
-DGROUP = (MEMOFS + LOADADDR(.data)) / 16;
-TGROUP = (MEMOFS + LOADADDR(.text)) / 16;
-IGROUP = (MEMOFS + LOADADDR(.itext)) / 16;
-I_GROUP = (MEMOFS + LOADADDR(.idata)) / 16;
+PGROUP = LOADADDR(.ptext) / 16;
+LGROUP = LOADADDR(.ltext) / 16;
+DGROUP = LOADADDR(.data) / 16;
+TGROUP = LOADADDR(.text) / 16;
+IGROUP = LOADADDR(.itext) / 16;
+I_GROUP = LOADADDR(.idata) / 16;

 INITSIZE = SIZEOF(.itext) + SIZEOF(.idata) + SIZEOF(.ibss);

 SECTIONS
   {
     /* Target PSP section.  */
-    .ptext 0 : AT (0) {
+    .ptext 0 : AT (MEMOFS) {
                *(PSP)
     }

======

Thank you!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list