2003-04-22 01:14:14 +02:00
|
|
|
#if defined(__ia64__)
|
2003-03-27 05:29:07 +01:00
|
|
|
|
|
|
|
.global flush_cache
|
|
|
|
|
|
|
|
.proc flush_cache
|
|
|
|
flush_cache:
|
|
|
|
.prologue
|
|
|
|
alloc r2=ar.pfs,2,0,0,0
|
|
|
|
add r8=31,in1 // round up to 32 byte-boundary
|
|
|
|
;;
|
|
|
|
shr.u r8=r8,5 // we flush 32 bytes per iteration
|
|
|
|
;;
|
|
|
|
add r8=-1,r8
|
|
|
|
.save ar.lc, r3
|
|
|
|
mov r3=ar.lc // save ar.lc
|
|
|
|
;;
|
|
|
|
.body
|
|
|
|
|
|
|
|
mov ar.lc=r8
|
|
|
|
;;
|
|
|
|
.loop: fc in0 // issuable on M0 only
|
|
|
|
add in0=32,in0
|
|
|
|
br.cloop.sptk.few .loop
|
|
|
|
;;
|
|
|
|
sync.i
|
|
|
|
;;
|
|
|
|
srlz.i
|
|
|
|
;;
|
|
|
|
mov ar.lc=r3 // restore ar.lc
|
|
|
|
br.ret.sptk.many rp
|
|
|
|
.endp flush_cache
|
|
|
|
|
2004-08-20 13:23:15 +02:00
|
|
|
#elif defined(__i386__) || defined (__x86_64__)
|
2003-04-22 01:14:14 +02:00
|
|
|
|
|
|
|
.globl flush_cache
|
|
|
|
flush_cache:
|
|
|
|
ret
|
|
|
|
|
2005-05-03 11:13:17 +02:00
|
|
|
#elif defined(__hppa__)
|
|
|
|
|
|
|
|
# warning FIX ME!!
|
|
|
|
|
|
|
|
.globl flush_cache
|
|
|
|
flush_cache:
|
|
|
|
.proc
|
|
|
|
.callinfo
|
|
|
|
bv %r0(%rp)
|
|
|
|
.procend
|
2007-08-27 17:11:37 +02:00
|
|
|
#elif defined(__powerpc64__)
|
2007-09-13 05:52:25 +02:00
|
|
|
# warning IMPLEMENT ME FOR PPC64!!
|
|
|
|
.globl flush_cache
|
|
|
|
flush_cache:
|
|
|
|
lwz 11, 0(1) ;
|
|
|
|
lwz 0, 4(11) ;
|
|
|
|
mtlr 0 ;
|
|
|
|
lwz 31, -4(11) ;
|
|
|
|
mr 1, 11 ;
|
|
|
|
blr
|
|
|
|
#elif defined(__powerpc__)
|
|
|
|
# warning IMPLEMENT ME FOR PPC32!!
|
2007-08-27 17:11:37 +02:00
|
|
|
.globl flush_cache
|
|
|
|
flush_cache:
|
|
|
|
lwz 11, 0(1) ;
|
|
|
|
lwz 0, 4(11) ;
|
|
|
|
mtlr 0 ;
|
|
|
|
lwz 31, -4(11) ;
|
|
|
|
mr 1, 11 ;
|
|
|
|
blr
|
2004-08-20 13:23:15 +02:00
|
|
|
#else
|
2003-04-22 01:14:14 +02:00
|
|
|
# error Need flush_cache code for this architecture.
|
2003-03-27 05:29:07 +01:00
|
|
|
#endif
|
Mark Wielaard <mwielaard@redhat.com> writes:
On some systems executable stacks are denied. Since libunwind and the
tests don't actually need executable stacks this patch marks all
assembly files as not needing it.
The original patch comes from frysk:
2007-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* src/hppa/getcontext.S, src/hppa/setcontext.S, src/hppa/siglongjmp.S,
src/ia64/Ginstall_cursor.S, src/ia64/Linstall_cursor.S,
src/ia64/dyn_info_list.S, src/ia64/getcontext.S, src/ia64/longjmp.S,
src/ia64/setjmp.S, src/ia64/siglongjmp.S, src/ia64/sigsetjmp.S,
src/ppc64/longjmp.S, src/ppc64/siglongjmp.S, src/x86/longjmp.S,
src/x86/siglongjmp.S, src/x86_64/longjmp.S, src/x86_64/setcontext.S,
src/x86_64/siglongjmp.S: Stack should be non-executable, for SELinux.
I added a couple more markers for new files in current libunwind.
Before this patch you would get the following on selinux enabled
systems without allow_exec_stack: error while loading shared
libraries:
libunwind.so.7: cannot enable executable stack as shared object
requires: Permission denied
After the patch that error disappears and all test results are similar
to the results on systems without executable stack protection.
2007-10-01 16:35:01 +02:00
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
/* We do not need executable stack. */
|
|
|
|
.section .note.GNU-stack,"",@progbits
|
|
|
|
#endif
|