diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-07-01 15:29:34 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-07-01 15:29:34 +0000 |
commit | 35e7dc9a4be4e36fa5e21c1d3e38830ec9e29b8f (patch) | |
tree | 72ea67d1db8d5bca247046eeaa75a1de1d342ae0 /ld-gnu-to-sun | |
parent | 4974bc0b5ae38df989ed0d708299cca9f32046da (diff) | |
download | dh-illumos-35e7dc9a4be4e36fa5e21c1d3e38830ec9e29b8f.tar.gz |
Added linker wrapper to use with LD_ALTEXEC
Diffstat (limited to 'ld-gnu-to-sun')
-rwxr-xr-x | ld-gnu-to-sun | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ld-gnu-to-sun b/ld-gnu-to-sun new file mode 100755 index 0000000..0a5e083 --- /dev/null +++ b/ld-gnu-to-sun @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e +set -u + +cmd=/usr/bin/sunld + +while [ $# -ne 0 ]; do + case "$1" in + # GCC with GNU ld passes -m <emulation>, + # Sun ld does not need it, and -m options has different meaning: + -m) shift || true;; + + # Ignore long options, Sun ld does not support long options at all: + --*) ;; + + *) cmd="$cmd $1" ;; + esac + shift || true +done + +# Trace: +set -x +exec $cmd + +exit 0 + |