[Gcl-devel] Re: BFD relocations
Camm Maguire
camm@enhanced.com
Thu Jun 6 20:14:00 GMT 2002
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
More information about the Binutils
mailing list