From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32014 invoked by alias); 7 Jun 2002 03:14:48 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 32007 invoked from network); 7 Jun 2002 03:14:47 -0000 Received: from unknown (HELO intech19.enhanced.com) (66.134.96.17) by sources.redhat.com with SMTP; 7 Jun 2002 03:14:47 -0000 Received: from camm by intech19.enhanced.com with local (Exim 3.12 #1 (Debian)) id 17GAD5-0007dG-00; Thu, 06 Jun 2002 23:14:43 -0400 To: Daniel Jacobowitz Cc: binutils@sources.redhat.com, gcl-devel@gnu.org Subject: Re: [Gcl-devel] Re: BFD relocations References: <20020603050518.GA18965@branoic.them.org> <54vg90uibg.fsf@intech19.enhanced.com> <20020603222917.GA945@branoic.them.org> <54vg8ybuey.fsf@intech19.enhanced.com> <20020604214100.GA6239@nevyn.them.org> <54d6v6wvfp.fsf@intech19.enhanced.com> <20020604223014.GA7579@nevyn.them.org> <547kldpbu0.fsf@intech19.enhanced.com> <20020605230537.GA4336@nevyn.them.org> <54g001xnnf.fsf@intech19.enhanced.com> <20020606010956.GA7291@nevyn.them.org> From: Camm Maguire Date: Thu, 06 Jun 2002 20:14:00 -0000 In-Reply-To: Daniel Jacobowitz's message of "Wed, 5 Jun 2002 21:09:56 -0400" Message-ID: <547klbixuk.fsf@intech19.enhanced.com> X-SW-Source: 2002-06/txt/msg00197.txt.bz2 Greetings! I found an earlier cache flushing snippet for another arch: #define CLEAR_CACHE do { unsigned long ps = getpagesize(); \ char *beg = (char *)((unsigned long )(memory->cfd.cfd_start) & ~(ps-1)); \ char *end = ROUND_UP(memory->cfd.cfd_start + \ memory->cfd.cfd_size,ps); \ mprotect(beg,end-beg,PROT_READ|PROT_WRITE|PROT_EXEC);} while(0) Can mprotect be used in this way to portably flush the data cache? Thanks! -- Camm Maguire camm@enhanced.com ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah