mirror of git://git.musl-libc.org/musl
work around breakage in sh/fdpic __unmapself function
the C implementation of __unmapself used for potentially-nommu sh
assumed CRTJMP takes a function descriptor rather than a code address;
however, the actual dynamic linker needs a code address, and so commit
7a9669e977
changed the definition of the
macro in reloc.h. this commit puts the old macro back in a place where
it only affects __unmapself.
this is an ugly workaround and should be cleaned up at some point, but
at least it's well isolated.
This commit is contained in:
parent
7a9669e977
commit
cab2b1f9d7
|
@ -5,6 +5,11 @@ void __unmapself_sh_nommu(void *, size_t);
|
|||
|
||||
#if !defined(__SH3__) && !defined(__SH4__)
|
||||
#define __unmapself __unmapself_sh_nommu
|
||||
#include "dynlink.h"
|
||||
#undef CRTJMP
|
||||
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
||||
"mov.l @%0+,r0 ; mov.l @%0,r12 ; jmp @r0 ; mov %1,r15" \
|
||||
: : "r"(pc), "r"(sp) : "r0", "memory" )
|
||||
#include "../../../src/thread/__unmapself.c"
|
||||
#undef __unmapself
|
||||
extern __attribute__((__visibility__("hidden"))) unsigned __sh_nommu;
|
||||
|
|
Loading…
Reference in New Issue