From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 13 Sep 2005 20:09:33 +0400 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20050913160933.GA3290@solemn.turbinal.org> Mail-Followup-To: ALT Devel discussion list References: <20050913113158.GS3290@solemn.turbinal.org> <20050913143744.GB21249@basalt.office.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qTzJm9l2qECmSDiM" Content-Disposition: inline In-Reply-To: <20050913143744.GB21249@basalt.office.altlinux.org> Cc: Subject: [devel] lorder X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2005 16:10:32 -0000 Archived-At: List-Archive: List-Post: --qTzJm9l2qECmSDiM Content-Type: multipart/mixed; boundary="JK5NARynUCwOaxbc" Content-Disposition: inline --JK5NARynUCwOaxbc Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 13, 2005 at 06:37:45PM +0400, Dmitry V. Levin wrote: > =F3=CD. postfix-lorder.sh =D7 postfix-*.src.rpm =EB=D3=D4=C1=D4=C9, =D7 =D3=D4=C1=D2=D9=C8 =C0=CE=C9=CB=D3=C1=C8 =C5=D3=D4= =D8 =D4=C1=CB=C1=D1 =DB=D4=C1=D4=CE=C1=D1 "=C2=CE=D1". $ find ~/v7 -name '*lorder*' /home/at/v7/bin/lorder /home/at/v7/usr/man/man1/lorder.1 $ file /home/at/v7/bin/lorder -- =F3=E0=F2=F0=F2=F9=FA!! /home/at/v7/bin/lorder: ASCII C++ program text $ man /home/at/v7/bin/lorder |col -b LORDER(1) LORDER= (1) NAME lorder - find ordering relation for an object library SYNOPSIS lorder file ... DESCRIPTION The input is one or more object or library archive (see ar(1)) fil= es. The standard output is a list of pairs of object file names, mean= ing that the first file of the pair refers to external identifiers defi= ned in the second. The output may be processed by tsort(1) to find = an ordering of a library suitable for one-pass access by ld(1). This brash one-liner intends to build a new library from existing `= .o' files. ar cr library `lorder *.o | tsort` FILES *symref, *symdef nm(1), sed(1), sort(1), join(1) SEE ALSO tsort(1), ld(1), ar(1) BUGS The names of object files, in and out of libraries, must end with `.= o'; nonsense results otherwise. $ --JK5NARynUCwOaxbc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=lorder trap "rm -f $$sym?ef; exit" 0 1 2 13 15 case $# in 0) echo usage: lorder file ... exit ;; 1) case $1 in *.o) set $1 $1 esac esac nm -g $* | sed ' /^$/d /:$/{ /\.o:/!d s/:// h s/.*/& &/ p d } /[TD] /{ s/.* // G s/\n/ / w '$$symdef' d } s/.* // G s/\n/ / w '$$symref' d ' sort $$symdef -o $$symdef sort $$symref -o $$symref join $$symref $$symdef | sed 's/[^ ]* *//' --JK5NARynUCwOaxbc-- --qTzJm9l2qECmSDiM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFDJvm9fBKgtDjnu0YRApdpAKCdkbz9cfb6yJjqr25M4eNsu+ufiQCgnUc2 4mLsV6ZX2A5ZXOZT0G75KMU= =TOYn -----END PGP SIGNATURE----- --qTzJm9l2qECmSDiM--