File: link.libc6

package info (click to toggle)
mocka 9605-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 2,488 kB
  • ctags: 105
  • sloc: asm: 452; makefile: 198; sh: 124; ansic: 14
file content (29 lines) | stat: -rw-r--r-- 676 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

SYSDIR=`dirname $0`

case $1 in
'-elf' ) LD='/usr/bin/ld ' ;
	 PRE='/usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i486-linux/2.7.2.3/crtbegin.o' ;
	 RTS=$SYSDIR/M2RTS-elf.o ;
	 POST='/usr/lib/gcc-lib/i486-linux/2.7.2.3/crtend.o /usr/lib/crtn.o'
	 shift ;;
*      ) LD='/usr/i486-linuxaout/bin/ld -m i386linux' ;
	 PRE='/usr/i486-linuxaout/lib/crt0.o' ;
	 RTS=$SYSDIR/M2RTS-aout.o ;
	 POST= ;;
esac;

case $1 in
'-static' ) STAT='-static' ; shift ;;
*         ) STAT='-dynamic-linker /lib/ld-linux.so.2' ;;
esac;

case $1 in
'-g' ) LIB=-lc ; shift ;;
*    ) LIB=-lc ;;
esac;

program=$1 ; shift ; modules="$*"

$LD -o $program $STAT $PRE $RTS $modules $LIB $POST