Discussion:
[uClinux-dev] qemu coldfire SIGILL with pthread app
Waldemar Brodkorb
2016-05-16 09:54:39 UTC
Permalink
Hi,

I compile and test the thread test app from here on
Qemu coldfire emulation:
http://debug.openadk.org/arm-pthreads/hello.c

Sometimes it works, sometimes I get SIGILL.

Here is the strace output when I get SIGILL:
~ # strace -f /test
ioctl(0, TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getpid() = 115
rt_sigaction(SIGRTMIN, {0x46c6184e, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x46c617ba, [RTMIN], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x46c613be, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46c76000
write(1, "x: 0, y: 0\n", 11x: 0, y: 0) = 11
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46aec000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46aee000
pipe([3, 4]) = 0
clone(child_stack=0x46aedfe0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 116
write(4, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
write(4, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([], 8strace: Process 116 attached <unfinished ...>
[pid 116] rt_sigprocmask(SIG_SETMASK, ~[TRAP RT_1], NULL, 8) = 0
[pid 116] read(3, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
[pid 116] poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}])
[pid 116] getppid() = 115
[pid 116] read(3, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
[pid 116] mmap2(NULL, 20480, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f60000
[pid 116] clone(child_stack=0x47f63ea0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|SIGRT_1) = 117
[pid 116] kill(115, SIGRTMIN <unfinished ...>
[pid 115] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 115] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=116, si_uid=0} ---
[pid 115] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 115] write(1, "y increment finished\n", 21y increment finished) = 21
[pid 115] rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
[pid 115] rt_sigsuspend([], 8strace: Process 117 attached <unfinished ...>
[pid 117] getpid() = 117
[pid 117] rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
[pid 117] write(1, "x increment finished\n", 21x increment finished) = 21
[pid 117] kill(115, SIGRTMIN <unfinished ...>
[pid 115] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 115] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=117, si_uid=0} ---
[pid 115] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 115] --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x46c6b220} ---
[pid 115] +++ killed by SIGILL +++
[pid 117] +++ killed by SIGILL +++
+++ killed by SIGILL +++
ILL

And here when it works:
~ # strace -f /test
ioctl(0, TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getpid() = 111
rt_sigaction(SIGRTMIN, {0x46c6184e, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x46c617ba, [RTMIN], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x46c613be, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46c76000
write(1, "x: 0, y: 0\n", 11x: 0, y: 0) = 11
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f68000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f6a000
pipe([3, 4]) = 0
clone(child_stack=0x47f69fe0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 112
write(4, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
write(4, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([], 8strace: Process 112 attached <unfinished ...>
[pid 112] rt_sigprocmask(SIG_SETMASK, ~[TRAP RT_1], NULL, 8) = 0
[pid 112] read(3, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
[pid 112] poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}])
[pid 112] getppid() = 111
[pid 112] read(3, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
[pid 112] mmap2(NULL, 20480, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f60000
[pid 112] clone(child_stack=0x47f63ea0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|SIGRT_1) = 113
strace: Process 113 attached
[pid 113] getpid() = 113
[pid 113] rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
[pid 113] write(1, "x increment finished\n", 21x increment finished) = 21
[pid 113] exit_group(0) = ?
[pid 113] +++ exited with 0 +++
[pid 112] kill(111, SIGRTMIN <unfinished ...>
[pid 111] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 111] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=112, si_uid=0} ---
[pid 111] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 111] write(1, "y increment finished\n", 21y increment finished) = 21
[pid 111] write(4, "F\307\5 \0\0\0\1\0\0\4\2F\307_ F\306oXF\307\0074\0\0\0\0", 28) = 28
[pid 111] write(1, "x: 100, y: 100\n", 15x: 100, y: 100) = 15
[pid 111] write(4, "F\307\5 \0\0\0\2\0\0\0\0F\307_ \0\0\0\17F\306oXF\307\0074", 28) = 28
[pid 112] <... kill resumed> ) = 0
[pid 112] --- SIGRT_1 {si_signo=SIGRT_1, si_code=0x1, si_pid=113, si_uid=0} ---
[pid 112] sigreturn({mask=~[TRAP KILL STOP RT_1]}) = 0
[pid 112] poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}])
[pid 112] getppid() = 111
[pid 112] wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|__WCLONE, NULL) = 113
[pid 112] wait4(-1, 0x47f69f74, WNOHANG|__WCLONE, NULL) = -1 ECHILD (No child processes)
[pid 112] read(3, "F\307\5 \0\0\0\1\0\0\4\2F\307_ F\306oXF\307\0074\0\0\0\0", 28) = 28
[pid 112] poll([{fd=3, events=POLLIN}], 1, 2000 <unfinished ...>
[pid 111] rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
[pid 111] rt_sigsuspend([], 8 <unfinished ...>
[pid 112] <... poll resumed> ) = 1 ([{fd=3, revents=POLLIN}])
[pid 112] getppid() = 111
[pid 112] read(3, "F\307\5 \0\0\0\2\0\0\0\0F\307_ \0\0\0\17F\306oXF\307\0074", 28) = 28
[pid 112] kill(111, SIGRTMIN <unfinished ...>
[pid 111] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 111] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=112, si_uid=0} ---
[pid 111] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 111] wait4(112, <unfinished ...>
[pid 112] <... kill resumed> ) = 0
[pid 112] exit_group(0) = ?
[pid 112] +++ exited with 0 +++
<... wait4 resumed> NULL, __WCLONE, NULL) = 112
exit_group(0) = ?
+++ exited with 0 +++
~ #

Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.

Any idea?

best regards
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-05-18 14:25:04 UTC
Permalink
Hi Waldemar,
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
~ # strace -f /test
ioctl(0, TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getpid() = 115
rt_sigaction(SIGRTMIN, {0x46c6184e, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x46c617ba, [RTMIN], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x46c613be, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46c76000
write(1, "x: 0, y: 0\n", 11x: 0, y: 0) = 11
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46aec000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46aee000
pipe([3, 4]) = 0
clone(child_stack=0x46aedfe0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 116
write(4, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
write(4, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([], 8strace: Process 116 attached <unfinished ...>
[pid 116] rt_sigprocmask(SIG_SETMASK, ~[TRAP RT_1], NULL, 8) = 0
[pid 116] read(3, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
[pid 116] poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}])
[pid 116] getppid() = 115
[pid 116] read(3, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
[pid 116] mmap2(NULL, 20480, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f60000
[pid 116] clone(child_stack=0x47f63ea0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|SIGRT_1) = 117
[pid 116] kill(115, SIGRTMIN <unfinished ...>
[pid 115] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 115] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=116, si_uid=0} ---
[pid 115] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 115] write(1, "y increment finished\n", 21y increment finished) = 21
[pid 115] rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
[pid 115] rt_sigsuspend([], 8strace: Process 117 attached <unfinished ...>
[pid 117] getpid() = 117
[pid 117] rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
[pid 117] write(1, "x increment finished\n", 21x increment finished) = 21
[pid 117] kill(115, SIGRTMIN <unfinished ...>
[pid 115] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 115] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=117, si_uid=0} ---
[pid 115] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 115] --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x46c6b220} ---
[pid 115] +++ killed by SIGILL +++
[pid 117] +++ killed by SIGILL +++
+++ killed by SIGILL +++
ILL
~ # strace -f /test
ioctl(0, TCGETS, {B115200 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
getpid() = 111
rt_sigaction(SIGRTMIN, {0x46c6184e, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x46c617ba, [RTMIN], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x46c613be, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x46c76000
write(1, "x: 0, y: 0\n", 11x: 0, y: 0) = 11
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f68000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f6a000
pipe([3, 4]) = 0
clone(child_stack=0x47f69fe0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 112
write(4, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
write(4, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([], 8strace: Process 112 attached <unfinished ...>
[pid 112] rt_sigprocmask(SIG_SETMASK, ~[TRAP RT_1], NULL, 8) = 0
[pid 112] read(3, "F\3069\340\0\0\0\5F\307\7\fF\307\t\\F\307^\230F\306L\224F\307^\210", 28) = 28
[pid 112] poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}])
[pid 112] getppid() = 111
[pid 112] read(3, "F\307\5 \0\0\0\0\0\0\0\0F\306\1\214F\307^\304\200\0\0\0\0\0\0\0", 28) = 28
[pid 112] mmap2(NULL, 20480, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|MAP_UNINITIALIZED, 0, 0) = 0x47f60000
[pid 112] clone(child_stack=0x47f63ea0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|SIGRT_1) = 113
strace: Process 113 attached
[pid 113] getpid() = 113
[pid 113] rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
[pid 113] write(1, "x increment finished\n", 21x increment finished) = 21
[pid 113] exit_group(0) = ?
[pid 113] +++ exited with 0 +++
[pid 112] kill(111, SIGRTMIN <unfinished ...>
[pid 111] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 111] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=112, si_uid=0} ---
[pid 111] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 111] write(1, "y increment finished\n", 21y increment finished) = 21
[pid 111] write(4, "F\307\5 \0\0\0\1\0\0\4\2F\307_ F\306oXF\307\0074\0\0\0\0", 28) = 28
[pid 111] write(1, "x: 100, y: 100\n", 15x: 100, y: 100) = 15
[pid 111] write(4, "F\307\5 \0\0\0\2\0\0\0\0F\307_ \0\0\0\17F\306oXF\307\0074", 28) = 28
[pid 112] <... kill resumed> ) = 0
[pid 112] --- SIGRT_1 {si_signo=SIGRT_1, si_code=0x1, si_pid=113, si_uid=0} ---
[pid 112] sigreturn({mask=~[TRAP KILL STOP RT_1]}) = 0
[pid 112] poll([{fd=3, events=POLLIN}], 1, 2000) = 1 ([{fd=3, revents=POLLIN}])
[pid 112] getppid() = 111
[pid 112] wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|__WCLONE, NULL) = 113
[pid 112] wait4(-1, 0x47f69f74, WNOHANG|__WCLONE, NULL) = -1 ECHILD (No child processes)
[pid 112] read(3, "F\307\5 \0\0\0\1\0\0\4\2F\307_ F\306oXF\307\0074\0\0\0\0", 28) = 28
[pid 112] poll([{fd=3, events=POLLIN}], 1, 2000 <unfinished ...>
[pid 111] rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
[pid 111] rt_sigsuspend([], 8 <unfinished ...>
[pid 112] <... poll resumed> ) = 1 ([{fd=3, revents=POLLIN}])
[pid 112] getppid() = 111
[pid 112] read(3, "F\307\5 \0\0\0\2\0\0\0\0F\307_ \0\0\0\17F\306oXF\307\0074", 28) = 28
[pid 112] kill(111, SIGRTMIN <unfinished ...>
[pid 111] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted if no handler)
[pid 111] --- SIGRTMIN {si_signo=SIGRTMIN, si_code=SI_USER, si_pid=112, si_uid=0} ---
[pid 111] sigreturn({mask=[RTMIN]}) = -1 EINTR (Interrupted system call)
[pid 111] wait4(112, <unfinished ...>
[pid 112] <... kill resumed> ) = 0
[pid 112] exit_group(0) = ?
[pid 112] +++ exited with 0 +++
<... wait4 resumed> NULL, __WCLONE, NULL) = 112
exit_group(0) = ?
+++ exited with 0 +++
~ #
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
How often does it work, and not work?

I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.

This is what it gives:

/> strace hello
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo
...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo
...}) = 0
write(1, "x: 0, y: 0\n", 11x: 0, y: 0
) = 11
getpid() = 83
rt_sigaction(SIGRTMIN, {0x41461988, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x41461af2, [RTMIN], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x41461628, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
mmap2(NULL, 324, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS|0x4000000, 0, 0x4144afae) = 0x4142c000
mmap2(NULL, 8164, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS|0x4000000, 0, 0x4144afae) = 0x4142e000
pipe([3, 4]) = 0
clone(child_stack=0x4142ffe0,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND) = 84
write(4, "\0\0\0\0\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 28)
= 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
write(4, "ACK`\0\0\0\0\0\0\0\0AF\0\200AC\237<\200\0\0\0\0\0\0\0", 28x
increment finished
) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([]) = ? ERESTARTNOHAND (To be restarted)
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
sigreturn() = ? (mask now [ABRT])
write(1, "y increment finished\n", 21y increment finished
) = 21
write(4, "ACK`\0\0\0\1\0\0\4\2AFZ\252ACM(AGR'AC\237,", 28) = 28
write(1, "x: 100, y: 100\n", 15x: 100, y: 100
) = 15
write(4, "ACK`\0\0\0\2\0\0\0\0AC\0 \0\0\0\17AF\203,ACMP", 28) = 28
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([]) = ? ERESTARTNOHAND (To be restarted)
--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---
sigreturn() = ? (mask now [ABRT])
wait4(84, NULL, __WCLONE, NULL) = 84
munmap(0x4142c000, 324) = 0
exit_group(0) = ?

Regards
Greg
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Waldemar Brodkorb
2016-05-20 04:20:39 UTC
Permalink
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30

It is not always the same.
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.

best regards
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-05-26 07:19:13 UTC
Permalink
Hi Waldemar,
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30
It is not always the same.
Ok. I expect I would see it pretty easily though if I
run hello 100 times for example.
Post by Waldemar Brodkorb
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.
I was using an older 2.3.50. But I just pulled down 2.6 and
tried again. I still don't see any SIGILLs.

Looking at your strace dump and mine it puzzles me that the initial
startup is a little different. On my dump the first output
write() is the 3rd system call. On your traces it is much later.

Can you send me your hello (and hello.gdb) binaries?

Regards
Greg


_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Waldemar Brodkorb
2016-05-26 12:05:34 UTC
Permalink
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30
It is not always the same.
Ok. I expect I would see it pretty easily though if I
run hello 100 times for example.
Post by Waldemar Brodkorb
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.
I was using an older 2.3.50. But I just pulled down 2.6 and
tried again. I still don't see any SIGILLs.
Looking at your strace dump and mine it puzzles me that the initial
startup is a little different. On my dump the first output
write() is the 3rd system call. On your traces it is much later.
Can you send me your hello (and hello.gdb) binaries?
They are here:
http://debug.openadk.org/coldfire/

Are you using linuxthreads.old or linuxthreads.new?
I use old, and new will be removed in the next uClibc-ng release.

best regards
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-05-27 07:22:26 UTC
Permalink
Hi Waldemar,
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30
It is not always the same.
Ok. I expect I would see it pretty easily though if I
run hello 100 times for example.
Post by Waldemar Brodkorb
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.
I was using an older 2.3.50. But I just pulled down 2.6 and
tried again. I still don't see any SIGILLs.
Looking at your strace dump and mine it puzzles me that the initial
startup is a little different. On my dump the first output
write() is the 3rd system call. On your traces it is much later.
Can you send me your hello (and hello.gdb) binaries?
http://debug.openadk.org/coldfire/
Thanks. I can reproduce it with that binary easily.
Post by Waldemar Brodkorb
Are you using linuxthreads.old or linuxthreads.new?
I use old, and new will be removed in the next uClibc-ng release.
I am using the old linux threads. I have attached my uClibc-ng
config so you can see what I am using.

I can see that your hello binary is a good bit smaller than mine.
The code generated looks quite different too. Do you compile apps
and libs with -msep-data?

Regards
Greg
Waldemar Brodkorb
2016-05-27 19:35:58 UTC
Permalink
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30
It is not always the same.
Ok. I expect I would see it pretty easily though if I
run hello 100 times for example.
Post by Waldemar Brodkorb
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.
I was using an older 2.3.50. But I just pulled down 2.6 and
tried again. I still don't see any SIGILLs.
Looking at your strace dump and mine it puzzles me that the initial
startup is a little different. On my dump the first output
write() is the 3rd system call. On your traces it is much later.
Can you send me your hello (and hello.gdb) binaries?
http://debug.openadk.org/coldfire/
Thanks. I can reproduce it with that binary easily.
Post by Waldemar Brodkorb
Are you using linuxthreads.old or linuxthreads.new?
I use old, and new will be removed in the next uClibc-ng release.
I am using the old linux threads. I have attached my uClibc-ng
config so you can see what I am using.
I can see that your hello binary is a good bit smaller than mine.
The code generated looks quite different too. Do you compile apps
and libs with -msep-data?
That is the exact reason. I used FLAT without -msep-data.
When I use -msep-data I get no SIGILL.

Any idea why simple FLAT breaks the binaries?

best regards
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-06-08 11:38:58 UTC
Permalink
Hi Waldemar,

Sorry for the slow response. The uclinux-dev email list seems
very unreliable at the moment. I never got your last response,
but I can see it in the archives:

http://mailman.uclinux.org/pipermail/uclinux-dev/2016-May/052747.html
Waldemar Brodkorb wbx at openadk.org
Fri May 27 15:35:58 EDT 2016
Previous message: [uClinux-dev] qemu coldfire SIGILL with pthread app
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30
It is not always the same.
Ok. I expect I would see it pretty easily though if I
run hello 100 times for example.
Post by Waldemar Brodkorb
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.
I was using an older 2.3.50. But I just pulled down 2.6 and
tried again. I still don't see any SIGILLs.
Looking at your strace dump and mine it puzzles me that the initial
startup is a little different. On my dump the first output
write() is the 3rd system call. On your traces it is much later.
Can you send me your hello (and hello.gdb) binaries?
http://debug.openadk.org/coldfire/
Thanks. I can reproduce it with that binary easily.
Post by Waldemar Brodkorb
Are you using linuxthreads.old or linuxthreads.new?
I use old, and new will be removed in the next uClibc-ng release.
I am using the old linux threads. I have attached my uClibc-ng
config so you can see what I am using.
I can see that your hello binary is a good bit smaller than mine.
The code generated looks quite different too. Do you compile apps
and libs with -msep-data?
That is the exact reason. I used FLAT without -msep-data.
When I use -msep-data I get no SIGILL.
Any idea why simple FLAT breaks the binaries?
No, not sure why. I would have thought it should work.

Regards
Greg

_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Waldemar Brodkorb
2016-06-08 20:48:33 UTC
Permalink
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Sorry for the slow response. The uclinux-dev email list seems
very unreliable at the moment. I never got your last response,
http://mailman.uclinux.org/pipermail/uclinux-dev/2016-May/052747.html
Oh, that is bad :(
Post by Greg Ungerer
Post by Waldemar Brodkorb
Any idea why simple FLAT breaks the binaries?
No, not sure why. I would have thought it should work.
Can you reproduce it?
How should we handle this? Exclude simple FLAT in buildroot
for coldfire and default to sep-data?

best regards
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-06-13 01:39:57 UTC
Permalink
Hi Waldemar,
Post by Waldemar Brodkorb
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Sorry for the slow response. The uclinux-dev email list seems
very unreliable at the moment. I never got your last response,
http://mailman.uclinux.org/pipermail/uclinux-dev/2016-May/052747.html
Oh, that is bad :(
Post by Greg Ungerer
Post by Waldemar Brodkorb
Any idea why simple FLAT breaks the binaries?
No, not sure why. I would have thought it should work.
Can you reproduce it?
Yes. In fact I see problems problems with running any
apps when compiled without -msep-data. Though I get to a
shell on boot, it dies within a few seconds.
Post by Waldemar Brodkorb
How should we handle this? Exclude simple FLAT in buildroot
for coldfire and default to sep-data?
I think yes. I always build and test with -msep-data.

Regards
Greg


_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-08-11 05:11:50 UTC
Permalink
Hi Waldemar,

On this specific issue of simple flat binaries not working on m68k.
This fixes the issue:

http://marc.info/?l=linux-m68k&m=146976701216533&w=2

I can run your hello binary now with no problems after this is
applied.

Regards
Greg
Post by Greg Ungerer
Hi Waldemar,
Sorry for the slow response. The uclinux-dev email list seems
very unreliable at the moment. I never got your last response,
http://mailman.uclinux.org/pipermail/uclinux-dev/2016-May/052747.html
Waldemar Brodkorb wbx at openadk.org
Fri May 27 15:35:58 EDT 2016
Previous message: [uClinux-dev] qemu coldfire SIGILL with pthread app
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
Greg Ungerer wrote,
Post by Greg Ungerer
Post by Waldemar Brodkorb
I compile and test the thread test app from here on
http://debug.openadk.org/arm-pthreads/hello.c
Sometimes it works, sometimes I get SIGILL.
Tested with buildroot and qemu_m68k_mcf5208_defconfig. It uses gcc
4.9.3 and binutils 2.25.1. The kernel is 4.5.3 including the signal
handler patch. uClibc-ng 1.0.14 is used.
Any idea?
Do you get the SIGILL when running without strace?
Yes.
Post by Greg Ungerer
How often does it work, and not work?
~ # ill=0; for i in $(seq 1 50); do /test; if [ $? -ne 0 ]; then ill=$(($ill+1)) ;fi; sleep 2; done
~ # echo $ill
30
It is not always the same.
Ok. I expect I would see it pretty easily though if I
run hello 100 times for example.
Post by Waldemar Brodkorb
Post by Greg Ungerer
I have a setup with a gcc-5.3/binutils-2.25.1 toolchain building
linux-4.6 and using uClibc-ng-1.0.14 and using your hello.c test
app and I don't see any SIGILLs. Ran it quite a few times but
didn't see any.
Hmm. I now changed to gcc 5.3.0 and see the same problem.
Need to try linux-4.6. What version of Qemu are you using?
I recently updated to 2.6.0.
I was using an older 2.3.50. But I just pulled down 2.6 and
tried again. I still don't see any SIGILLs.
Looking at your strace dump and mine it puzzles me that the initial
startup is a little different. On my dump the first output
write() is the 3rd system call. On your traces it is much later.
Can you send me your hello (and hello.gdb) binaries?
http://debug.openadk.org/coldfire/
Thanks. I can reproduce it with that binary easily.
Post by Waldemar Brodkorb
Are you using linuxthreads.old or linuxthreads.new?
I use old, and new will be removed in the next uClibc-ng release.
I am using the old linux threads. I have attached my uClibc-ng
config so you can see what I am using.
I can see that your hello binary is a good bit smaller than mine.
The code generated looks quite different too. Do you compile apps
and libs with -msep-data?
That is the exact reason. I used FLAT without -msep-data.
When I use -msep-data I get no SIGILL.
Any idea why simple FLAT breaks the binaries?
No, not sure why. I would have thought it should work.
Regards
Greg
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Waldemar Brodkorb
2016-08-15 17:21:10 UTC
Permalink
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
On this specific issue of simple flat binaries not working on m68k.
http://marc.info/?l=linux-m68k&m=146976701216533&w=2
I can run your hello binary now with no problems after this is
applied.
Thanks for fixing this Bug!
It works for 4.6.5 for me.

In Buildroot are some build failures like:
http://autobuild.buildroot.net/results/1ec/1ec691746b5196e9fd6779c22ef2ca4600349fb4/

Which seems to be a limitation of mcf520x. When I disable msep-data
pcre can be compiled.

Is it possible to have a mixup of sep-data and one memory region
binaries on the same system?

best regards
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-08-17 12:56:52 UTC
Permalink
Hi Waldemar,
Post by Waldemar Brodkorb
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
On this specific issue of simple flat binaries not working on m68k.
http://marc.info/?l=linux-m68k&m=146976701216533&w=2
I can run your hello binary now with no problems after this is
applied.
Thanks for fixing this Bug!
It works for 4.6.5 for me.
That fix is in Linus' tree now, as of 4.8-rc2.
So it will be in linux-4.8 when released.
Post by Waldemar Brodkorb
http://autobuild.buildroot.net/results/1ec/1ec691746b5196e9fd6779c22ef2ca4600349fb4/
Which seems to be a limitation of mcf520x. When I disable msep-data
pcre can be compiled.
Not sure, perhaps it is exceeding the maximum entries of the GOT.
Post by Waldemar Brodkorb
Is it possible to have a mixup of sep-data and one memory region
binaries on the same system?
Oh yeah, that is no problem. The binfmt_flat loader does
the right things no matter which type was used to compile
the application.

Regards
Greg



_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Waldemar Brodkorb
2016-08-18 22:53:21 UTC
Permalink
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
On this specific issue of simple flat binaries not working on m68k.
http://marc.info/?l=linux-m68k&m=146976701216533&w=2
I can run your hello binary now with no problems after this is
applied.
Thanks for fixing this Bug!
It works for 4.6.5 for me.
That fix is in Linus' tree now, as of 4.8-rc2.
So it will be in linux-4.8 when released.
Post by Waldemar Brodkorb
http://autobuild.buildroot.net/results/1ec/1ec691746b5196e9fd6779c22ef2ca4600349fb4/
Which seems to be a limitation of mcf520x. When I disable msep-data
pcre can be compiled.
Not sure, perhaps it is exceeding the maximum entries of the GOT.
Post by Waldemar Brodkorb
Is it possible to have a mixup of sep-data and one memory region
binaries on the same system?
Oh yeah, that is no problem. The binfmt_flat loader does
the right things no matter which type was used to compile
the application.
I discussed our Buildroot issues with Thomas.
Is there any benefit using -msep-data if Application XIP isn't used?

The toolchain used for Buildroot autobuilder defaults to -msep-data
and breaks compilation of software packages as pcre, fftw, ffmpeg
and more. We can just remove -msep-data for these packages, but this
makes no sense, if the application can not be used in a XIP only
firmware.
So is there any benefit in having -msep-data when non-XIP is used?

Thanks in advance for your advice,
Waldemar
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2016-08-19 03:40:17 UTC
Permalink
Hi Waldemar,
Post by Waldemar Brodkorb
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
Post by Waldemar Brodkorb
Hi Greg,
Greg Ungerer wrote,
Post by Greg Ungerer
Hi Waldemar,
On this specific issue of simple flat binaries not working on m68k.
http://marc.info/?l=linux-m68k&m=146976701216533&w=2
I can run your hello binary now with no problems after this is
applied.
Thanks for fixing this Bug!
It works for 4.6.5 for me.
That fix is in Linus' tree now, as of 4.8-rc2.
So it will be in linux-4.8 when released.
Post by Waldemar Brodkorb
http://autobuild.buildroot.net/results/1ec/1ec691746b5196e9fd6779c22ef2ca4600349fb4/
Which seems to be a limitation of mcf520x. When I disable msep-data
pcre can be compiled.
Not sure, perhaps it is exceeding the maximum entries of the GOT.
Post by Waldemar Brodkorb
Is it possible to have a mixup of sep-data and one memory region
binaries on the same system?
Oh yeah, that is no problem. The binfmt_flat loader does
the right things no matter which type was used to compile
the application.
I discussed our Buildroot issues with Thomas.
Is there any benefit using -msep-data if Application XIP isn't used?
The toolchain used for Buildroot autobuilder defaults to -msep-data
and breaks compilation of software packages as pcre, fftw, ffmpeg
and more. We can just remove -msep-data for these packages, but this
makes no sense, if the application can not be used in a XIP only
firmware.
So is there any benefit in having -msep-data when non-XIP is used?
No, not really. The code (text) section of an -msep-data binary
will be slightly larger (few %) due to it being PIC. Oddly enough
though non -msep-data binaries are usually slightly larger due to
the much larger number of relocations needed to be stored.

As you have found the limitations on code size and relocations
hit you with -msep-data - and you will not have those will fully
absolute binaries.

Dropping -msep-data is probably the best choice here. Keeping in
mind that it is currently broken without the m68k/signal.c kernel
patch.

Regards
Greg



_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Loading...