Well, that failed spectacularly fast.
Code:
22:00:26 [4008d896] execve("kterm/bin/matchbox-keyboard", ["kterm/bin/matchbox-keyboard"], ["HISTFILESIZE=1000", "INPUTRC=/etc/inputrc", "SSH_CLIENT=192.168.2.1 40922 22", "USER=root", "HOSTNAME=kindle", "HOME=/tmp/root", "SSH_TTY=/dev/pts/0", "PAGER=less", "PS1=[\\u@\\h \\W]\\$ ", "LOGNAME=root", "TERM=xterm", "PATH=/usr/local/bin:/bin:/usr/bi"..., "DISPLAY=:0.0", "HISTSIZE=12000", "LANG=en_US.utf8", "SHELL=/bin/sh", "PWD=/tmp/root", "LC_ALL=en_US.utf8", "SSH_CONNECTION=192.168.2.1 40922"..., "KINDLE_TZ=GMT+01:00", "EDITOR=nano", "SHLVL=1", "OLDPWD=/tmp/root", "ZDOTDIR=/mnt/us/usbnet/etc/zsh", "LESSCOLOR=yes", "HOSTTYPE=armv7l", "COLORTERM=yes", "MANPAGER=less", "WORDCHARS=*?_[]~=&;!#$%^(){}", "LS_COLORS=no=00:fi=00:di=34:ow=3"..., "_=/usr/bin/strace"]) = 0
22:00:26 [40010d56] brk(NULL) = 0x19000
22:00:26 [400021cc] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x6194} ---
Beat that! ;p.
EDIT:
TL;DR: Don't use '$ORIGIN' as-is, it blows up. Use the real absolute path, that doesn't.
And, according to the docs, use patchelf post-strip, some binutils versions don't like what patchelf does when stripping, and generate borked binaries.
EDIT: ... or not, I was working from an already-patchelf'ed binary. Doing that with the original binary segfaults >_w".
EDITē:
'$ORIGIN/.' appears to work, on the other hand. The classic usage being something like '$ORIGIN/../lib', FWIW, which plays nicely with a classic *nix directory tree.
EDIT: ... or not, I was working from an already-patchelf'ed binary. Doing that with the original binary segfaults >_w".
EDIT^3:
'${ORIGIN}' works, though. Ah, the mysteries of ld ;o).
EDIT: ... or not, I was working from an already-patchelf'ed binary. Doing that with the original binary segfaults >_w".
NB: See next post.