From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Ian Lance Taylor Cc: geoffk@ozemail.com.au, binutils@sourceware.cygnus.com Subject: Re: elf32.em Date: Wed, 03 Nov 1999 07:49:00 -0000 Message-id: <3075.941644021@upchuck> References: <19991027234806.10154.qmail@daffy.airs.com> X-SW-Source: 1999-11/msg00012.html In message <19991027234806.10154.qmail@daffy.airs.com>you write: > Date: Wed, 27 Oct 1999 18:48:30 +1000 > From: Geoff Keating > > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Ian Lance Taylor Cc: geoffk@ozemail.com.au, binutils@sourceware.cygnus.com Subject: Re: elf32.em Date: Wed, 03 Nov 1999 07:49:00 -0000 Message-ID: <3075.941644021@upchuck> References: <19991027234806.10154.qmail@daffy.airs.com> X-SW-Source: 1999-q4/msg00197.html Message-ID: <19991103074900.mxo0m94qDc6PsB5-ybHGNA29P8J4JYusJfrOW4xQVLc@z> In message < 19991027234806.10154.qmail@daffy.airs.com >you write: > Date: Wed, 27 Oct 1999 18:48:30 +1000 > From: Geoff Keating > > 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