www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/17/18:20:45

Date: Mon, 17 Jan 94 17:49:42 -0500
From: DJ Delorie <dj AT ctron DOT com>
To: S_Eckart AT lis DOT e-technik DOT tu-muenchen DOT de
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: -pg profiling bug again

> If I link with this modified version of gcrt0.o I get a General Protection
> Fault (unsupported INT 0x0d) from the instruction
>
> 	movw	%ds,%cs:__ds_sav
>
> during initialization. I don't know much about protected mode, but I
> could imagine that the code segment is read-only. If that's the case,
> where else could I store the value of DS to make it available to the
> interrupt? Or, if the code segment is not read-only, what else is causing
> the general protection fault?

The code segment *is* read-only.  Since you're saving %ds, assume that it
has the current data segment in it, and skip the %cs override:

	movw	%ds, __ds_sav


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019