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: Etienne Robillard
Subject: Re: create_archive_ia32.pl (ddf)
Date: Fri, 25 Jun 2004 12:55:20 -0400
User-agent: Mozilla Thunderbird 0.6 (X11/20040615)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bas,

Bas Wijnen wrote:
| 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.

Yea, it seem's possible to do it with others utilities included in /bin
or in /usr/bin as well.

|
|
|>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.

Sorry, my fault. I was in a rush for doing sometime elses and that time
and I must admit that "the grep solution (tm)" is not so sporty for a
task like this.

However, constructive criticism is always welcomed, and as you noted,
the logic was not valid for that specific situation.

| Bye,
| Bas
|

Thanks for the shoulder,
Etienne
-----BEGIN PGP SIGNATURE-----

iD8DBQFA3Fj3fhO/J4JSDfYRAoceAKC8ViaYATDlyuOjLLko1X915dpuOgCg5ZG8
bbpUl92utFn1d7N0KIHXb5w=
=Rbxu
-----END PGP SIGNATURE-----




reply via email to

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