|
|
1.1 root 1: #! /bin/sh 1.1.1.2 ! root 2: ! 3: if [ $# != 2 ] ! 4: then ! 5: echo 'usage: libconvert from.a to.a' ! 6: exit 1 ! 7: fi ! 8: ! 9: fromlib=$1 ! 10: tolib=$2 ! 11: 1.1 root 12: # 13: # Convert coff libc to a coff-encapsulated libc 14: # suitable for linking with the GNU linker. 15: # 16: # Extract all members of /lib/libc.a (using coff ar). 17: # Convert each using robotussin. 18: # Create new libc (using gnu ar) with members in the same order as coff libc. 19: 20: # set -e makes this script exit if any command gets an error 21: set -e 1.1.1.2 ! root 22: ! 23: case $fromlib in ! 24: /*) rel_fromlib=$fromlib ;; ! 25: *) rel_fromlib=../$fromlib ;; ! 26: esac ! 27: ! 28: case $tolib in ! 29: /*) rel_tolib=$tolib ;; ! 30: *) rel_tolib=../$tolib ;; ! 31: esac ! 32: ! 33: rm -rf libconvert-tmp ! 34: mkdir libconvert-tmp ! 35: cd libconvert-tmp ! 36: /bin/ar x $rel_fromlib 1.1 root 37: for i in *.o 38: do 1.1.1.2 ! root 39: echo $i 1.1 root 40: ../robotussin $i x 41: mv x $i 42: done 1.1.1.2 ! root 43: rm -f $rel_tolib ! 44: ../ar rs $rel_tolib `/bin/ar t $rel_fromlib` 1.1 root 45: cd .. 1.1.1.2 ! root 46: rm -rf libconvert-tmp
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.