mirror of
git://git.musl-libc.org/musl
synced 2024-12-24 15:43:06 +00:00
2d0290debf
the dynamic linker was found to hang when used as the PT_INTERP, but
not when invoked as a command. the mechanism of this failure was not
determined, but the cause is clear:
commit 5552ce5200
removed the SHARED
macro, but arch/sh/crt_arch.h is still using it to choose the right
form of the crt/ldso entry point code. moving the forced definition
from rcrt1.c to dlstart.c restores the old behavior. eventually the
logic should be changed to fully remove the SHARED macro or at least
rename it to something more reasonable.
16 lines
424 B
C
16 lines
424 B
C
#define START "_start"
|
|
#define _dlstart_c _start_c
|
|
#include "../ldso/dlstart.c"
|
|
|
|
int main();
|
|
void _init() __attribute__((weak));
|
|
void _fini() __attribute__((weak));
|
|
_Noreturn int __libc_start_main(int (*)(), int, char **,
|
|
void (*)(), void(*)(), void(*)());
|
|
|
|
__attribute__((__visibility__("hidden")))
|
|
_Noreturn void __dls2(unsigned char *base, size_t *sp)
|
|
{
|
|
__libc_start_main(main, *sp, (void *)(sp+1), _init, _fini, 0);
|
|
}
|