* elf32.em
@ 1999-10-27 16:33 Geoff Keating
1999-10-27 16:48 ` elf32.em Ian Lance Taylor
0 siblings, 1 reply; 6+ messages in thread
From: Geoff Keating @ 1999-10-27 16:33 UTC (permalink / raw)
To: binutils
In elf32.em, there's this code:
FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
very pretty. I haven't been able to think of anything that is
pretty, though. */
if (bfd_check_format (entry->the_bfd, bfd_object)
&& (entry->the_bfd->flags & DYNAMIC) != 0)
{
char *filname, *needed_name;
ASSERT (entry->is_archive && entry->search_dirs_flag);
/* Rather than duplicating the logic above. Just use the
filename we recorded earlier.o
First strip off everything before the last '/'. */
filename = strrchr (entry->filename, '/');
Shouldn't the variable be called 'filename'?
--
Geoffrey Keating <geoffk@cygnus.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: elf32.em
1999-10-27 16:33 elf32.em Geoff Keating
@ 1999-10-27 16:48 ` Ian Lance Taylor
1999-10-27 23:27 ` elf32.em Jeffrey A Law
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ian Lance Taylor @ 1999-10-27 16:48 UTC (permalink / raw)
To: geoffk; +Cc: binutils, law
Date: Wed, 27 Oct 1999 18:48:30 +1000
From: Geoff Keating <geoffk@ozemail.com.au>
In elf32.em, there's this code:
FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
very pretty. I haven't been able to think of anything that is
pretty, though. */
if (bfd_check_format (entry->the_bfd, bfd_object)
&& (entry->the_bfd->flags & DYNAMIC) != 0)
{
char *filname, *needed_name;
ASSERT (entry->is_archive && entry->search_dirs_flag);
/* Rather than duplicating the logic above. Just use the
filename we recorded earlier.o
First strip off everything before the last '/'. */
filename = strrchr (entry->filename, '/');
Shouldn't the variable be called 'filename'?
Actually, I think the uses of it should be filname, to avoid
shadowing. Or we should just remove the declaration of filname, and
use the existing filename local.
Jeff, I'm not sure it's a good idea to try for the .sl extension on
every system type, given that it is only meaningful on HP/UX. If
there is a long search path, it is a waste of time. It is also
incorrect in principle. You can test for a particular emulation using
#ifdef TARGET_IS_xxx.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: elf32.em
1999-10-27 16:48 ` elf32.em Ian Lance Taylor
@ 1999-10-27 23:27 ` Jeffrey A Law
1999-11-03 7:49 ` elf32.em Jeffrey A Law
1999-11-03 8:24 ` elf32.em Jeffrey A Law
2 siblings, 0 replies; 6+ messages in thread
From: Jeffrey A Law @ 1999-10-27 23:27 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: geoffk, binutils
In message < 19991027234806.10154.qmail@daffy.airs.com >you write:
> if (bfd_check_format (entry->the_bfd, bfd_object)
> && (entry->the_bfd->flags & DYNAMIC) != 0)
> {
> char *filname, *needed_name;
>
> ASSERT (entry->is_archive && entry->search_dirs_flag);
>
> /* Rather than duplicating the logic above. Just use the
> filename we recorded earlier.o
>
> First strip off everything before the last '/'. */
> filename = strrchr (entry->filename, '/');
>
> Shouldn't the variable be called 'filename'?
>
> Actually, I think the uses of it should be filname, to avoid
> shadowing. Or we should just remove the declaration of filname, and
> use the existing filename local.
>
> Jeff, I'm not sure it's a good idea to try for the .sl extension on
> every system type, given that it is only meaningful on HP/UX. If
> there is a long search path, it is a waste of time. It is also
> incorrect in principle. You can test for a particular emulation using
> #ifdef TARGET_IS_xxx.
I didn't know we could use TARGET_IS_xxx to do this stuff. I'll certainly
change it. I'm no fan of the current behavior applying to all targets.
Thanks for pointing it out.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: elf32.em
1999-10-27 16:48 ` elf32.em Ian Lance Taylor
1999-10-27 23:27 ` elf32.em Jeffrey A Law
@ 1999-11-03 7:49 ` Jeffrey A Law
1999-11-03 7:49 ` elf32.em Jeffrey A Law
1999-11-03 8:24 ` elf32.em Jeffrey A Law
2 siblings, 1 reply; 6+ messages in thread
From: Jeffrey A Law @ 1999-11-03 7:49 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: geoffk, binutils
In message <19991027234806.10154.qmail@daffy.airs.com>you write:
> Date: Wed, 27 Oct 1999 18:48:30 +1000
> From: Geoff Keating <geoffk@ozemail.com.au>
>
> In elf32.em, there's this code:
>
> FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
> very pretty. I haven't been able to think of anything that is
> pretty, though. */
> if (bfd_check_format (entry->the_bfd, bfd_object)
> && (entry->the_bfd->flags & DYNAMIC) != 0)
> {
> char *filname, *needed_name;
>
> ASSERT (entry->is_archive && entry->search_dirs_flag);
>
> /* Rather than duplicating the logic above. Just use the
> filename we recorded earlier.o
>
> First strip off everything before the last '/'. */
> filename = strrchr (entry->filename, '/');
>
> Shouldn't the variable be called 'filename'?
>
> Actually, I think the uses of it should be filname, to avoid
> shadowing. Or we should just remove the declaration of filname, and
> use the existing filename local.
>
> Jeff, I'm not sure it's a good idea to try for the .sl extension on
> every system type, given that it is only meaningful on HP/UX. If
> there is a long search path, it is a waste of time. It is also
> incorrect in principle. You can test for a particular emulation using
> #ifdef TARGET_IS_xxx.
I found out what happened with this.
Uli never checked in the version that conditionalized the hpux check to
the binutils repository. Ugh.
Instead of using a TARGET_IS_xxx, he has a macro which specifies an alternate
shared library extension to check. That seems to make more sense to me as
other targets could potentially use it if necessary.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: elf32.em
1999-11-03 7:49 ` elf32.em Jeffrey A Law
@ 1999-11-03 7:49 ` Jeffrey A Law
0 siblings, 0 replies; 6+ messages in thread
From: Jeffrey A Law @ 1999-11-03 7:49 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: geoffk, binutils
In message < 19991027234806.10154.qmail@daffy.airs.com >you write:
> Date: Wed, 27 Oct 1999 18:48:30 +1000
> From: Geoff Keating <geoffk@ozemail.com.au>
>
> In elf32.em, there's this code:
>
> FIXME: This approach--using bfd_elf_set_dt_needed_name--is not
> very pretty. I haven't been able to think of anything that is
> pretty, though. */
> if (bfd_check_format (entry->the_bfd, bfd_object)
> && (entry->the_bfd->flags & DYNAMIC) != 0)
> {
> char *filname, *needed_name;
>
> ASSERT (entry->is_archive && entry->search_dirs_flag);
>
> /* Rather than duplicating the logic above. Just use the
> filename we recorded earlier.o
>
> First strip off everything before the last '/'. */
> filename = strrchr (entry->filename, '/');
>
> Shouldn't the variable be called 'filename'?
>
> Actually, I think the uses of it should be filname, to avoid
> shadowing. Or we should just remove the declaration of filname, and
> use the existing filename local.
>
> Jeff, I'm not sure it's a good idea to try for the .sl extension on
> every system type, given that it is only meaningful on HP/UX. If
> there is a long search path, it is a waste of time. It is also
> incorrect in principle. You can test for a particular emulation using
> #ifdef TARGET_IS_xxx.
I found out what happened with this.
Uli never checked in the version that conditionalized the hpux check to
the binutils repository. Ugh.
Instead of using a TARGET_IS_xxx, he has a macro which specifies an alternate
shared library extension to check. That seems to make more sense to me as
other targets could potentially use it if necessary.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: elf32.em
1999-10-27 16:48 ` elf32.em Ian Lance Taylor
1999-10-27 23:27 ` elf32.em Jeffrey A Law
1999-11-03 7:49 ` elf32.em Jeffrey A Law
@ 1999-11-03 8:24 ` Jeffrey A Law
2 siblings, 0 replies; 6+ messages in thread
From: Jeffrey A Law @ 1999-11-03 8:24 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: geoffk, binutils
> Shouldn't the variable be called 'filename'?
>
> Actually, I think the uses of it should be filname, to avoid
> shadowing. Or we should just remove the declaration of filname, and
> use the existing filename local.
One last thing. Yes, the "filname" variable should just disappear. I'll
take care of that too.
I'm testing the changes now..
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1999-11-03 8:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-27 16:33 elf32.em Geoff Keating
1999-10-27 16:48 ` elf32.em Ian Lance Taylor
1999-10-27 23:27 ` elf32.em Jeffrey A Law
1999-11-03 7:49 ` elf32.em Jeffrey A Law
1999-11-03 7:49 ` elf32.em Jeffrey A Law
1999-11-03 8:24 ` elf32.em Jeffrey A Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).