Date: Wed, 27 Mar 1996 22:27:46 -0500 From: dj (DJ Delorie) Message-Id: <199603280327.WAA27469@delorie.com> To: djgpp-workers Subject: [idr AT cs DOT pdx DOT edu: Bugs in crt0.s] Date: Wed, 27 Mar 1996 18:58:38 +0000 From: Ian Romanick X-Mailer: Mozilla 2.0 (Win16; I) MIME-Version: 1.0 To: dj AT delorie DOT com Subject: Bugs in crt0.s X-URL: http://www.delorie.com/users/dj/ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm sure that this isn't to correct address to send a bug report to, but I couldn't find anything in the v2 that FAQ that suggested a better place. (Not find it easily, at least) Anyway, please change the following lines in src/libc/crt0/crt0.s (around line 103): movw %cs, %cx /* get CPL from %cs */ andl $3, %ecx shll $5, %ecx /* move it into place */ orw $0xc093, %cx to: movw %cs,%ax lar %ax,%cx /* get CPL from %cs */ movb %ch,%cl /* move it into place */ andl $0x0060,%ecx /* mask off unneeded bits *. orw $0xc093,%cx The original version will work in most places, but it is not correct. This code will NOT work if you try to run it from a DXE. Well, it will work, but will cause your program to crash later. :(