l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: create_archive_ia32.pl (ddf)


From: Bas Wijnen
Subject: Re: create_archive_ia32.pl (ddf)
Date: Thu, 24 Jun 2004 12:28:21 +0200
User-agent: Mutt/1.3.28i

On Wed, Jun 23, 2004 at 06:54:31PM -0400, Etienne Robillard wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> | address@hidden:~/src/hurd/fabrica/fabrica-archive$ ld --verbose  | grep i386
> |    elf_i386
> |    i386linux
> | OUTPUT_FORMAT("elf32-i386", "elf32-i386",
> |               "elf32-i386")
> | OUTPUT_ARCH(i386)
> | SEARCH_DIR("/usr/i386-linux/lib"); SEARCH_DIR("/usr/lib");
> SEARCH_DIR("/usr/l   l/lib"); SEARCH_DIR("/lib");
> |
> | As you can see ld reports the interesting info on line 3 and 4 instead
> | of 2 and 3.  I think you should grep for OUTPUT_FORMAT and OUTPUT_ARCH
> | to make it more robust.
> I've tried and failed that too ;)

How about something like:
ldverbose=$(ld --verbose)
first="$(echo "$ldverbose" | grep --line-number ^OUTPUT_FORMAT | cut -d: -f1)"
last="$(echo "$ldverbose" | grep --line-number ^OUTPUT_ARCH | cut -d: -f1)"
var_you_want="$(echo "$ldverbose" | sed -n "$first,$[$last-1]p")"

I don't speak perl, but all I do is calling programs in /bin, which I'm sure
is possible with it.

> Does grepping for 'elf32' works on your system?

It might, and it might not.  If you use it, you are saying "elf32" may not be
in any other line.  This is clearly wrong, even if it works.

Bye,
Bas

-- 
I encourage sending me encrypted e-mail.
Please send the central message of e-mails as plain text in the message body,
   not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
for more information, see http://129.125.47.90/e-mail.html

Attachment: pgpKnhBIKwgVX.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]