Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): Clean up code to use EXTRA_SHLIB_EXTENSION. 1999-09-14 Ulrich Drepper <drepper@cygnus.com> * configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target. * config.in: Add EXTRA_SHLIB_EXTENSION. * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION is defined.
This commit is contained in:
parent
53b0d3971a
commit
93a6d43674
5 changed files with 257 additions and 222 deletions
14
ld/ChangeLog
14
ld/ChangeLog
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
|
||||||
|
Clean up code to use EXTRA_SHLIB_EXTENSION.
|
||||||
|
|
||||||
1999-11-03 Nick Clifton <nickc@cygnus.com>
|
1999-11-03 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian.
|
* emulparams/elf32mcore.sh (OUTPUT_FORMAT): Change to little endian.
|
||||||
|
@ -121,6 +126,15 @@ Wed Sep 15 02:47:43 1999 Jeffrey A Law (law@cygnus.com)
|
||||||
* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for
|
* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): allow for
|
||||||
terminating null.
|
terminating null.
|
||||||
|
|
||||||
|
1999-09-14 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* configure.in: Define EXTRA_SHLIB_EXTENSION to ".sl" for HP target.
|
||||||
|
* config.in: Add EXTRA_SHLIB_EXTENSION.
|
||||||
|
|
||||||
|
* emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive):
|
||||||
|
Search for second shared lib extension only if EXTRA_SHLIB_EXTENSION
|
||||||
|
is defined.
|
||||||
|
|
||||||
1999-09-14 Nick Clifton <nickc@cygnus.com>
|
1999-09-14 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
* Makefile.in: Add earm_epoc_pe.c build target.
|
* Makefile.in: Add earm_epoc_pe.c build target.
|
||||||
|
|
|
@ -169,3 +169,6 @@
|
||||||
/* Define if environ is not declared in system header files. */
|
/* Define if environ is not declared in system header files. */
|
||||||
#undef NEED_DECLARATION_ENVIRON
|
#undef NEED_DECLARATION_ENVIRON
|
||||||
|
|
||||||
|
/* Additional extension a shared object might have. */
|
||||||
|
#undef EXTRA_SHLIB_EXTENSION
|
||||||
|
|
||||||
|
|
423
ld/configure
vendored
423
ld/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -186,5 +186,15 @@ else
|
||||||
fi
|
fi
|
||||||
AC_SUBST(TESTBFDLIB)
|
AC_SUBST(TESTBFDLIB)
|
||||||
|
|
||||||
|
target_vendor=${target_vendor=$host_vendor}
|
||||||
|
case "$target_vendor" in
|
||||||
|
hp) EXTRA_SHLIB_EXTENSION=".sl" ;;
|
||||||
|
*) EXTRA_SHLIB_EXTENSION= ;;
|
||||||
|
esac
|
||||||
|
if test x${EXTRA_SHLIB_EXTENSION} != x ; then
|
||||||
|
AC_DEFINE_UNQUOTED(EXTRA_SHLIB_EXTENSION, "$EXTRA_SHLIB_EXTENSION",
|
||||||
|
[Additional extension a shared object might have.])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
|
AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
|
||||||
[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
|
[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
|
||||||
|
|
|
@ -95,24 +95,31 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
|
||||||
|
|
||||||
filename = entry->filename;
|
filename = entry->filename;
|
||||||
|
|
||||||
|
/* This allocates a few bytes too many when EXTRA_SHLIB_EXTENSION
|
||||||
|
is defined, but it does not seem worth the headache to optimize
|
||||||
|
away those two bytes of space. */
|
||||||
string = (char *) xmalloc (strlen (search->name)
|
string = (char *) xmalloc (strlen (search->name)
|
||||||
+ strlen (filename)
|
+ strlen (filename)
|
||||||
+ strlen (arch)
|
+ strlen (arch)
|
||||||
|
#ifdef EXTRA_SHLIB_EXTENSION
|
||||||
|
+ strlen (EXTRA_SHLIB_EXTENSION)
|
||||||
|
#endif
|
||||||
+ sizeof "/lib.so");
|
+ sizeof "/lib.so");
|
||||||
|
|
||||||
sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
|
sprintf (string, "%s/lib%s%s.so", search->name, filename, arch);
|
||||||
|
|
||||||
|
#ifdef EXTRA_SHLIB_EXTENSION
|
||||||
|
/* Try the .so extension first. If that fails build a new filename
|
||||||
|
using EXTRA_SHLIB_EXTENSION. */
|
||||||
|
if (! ldfile_try_open_bfd (string, entry))
|
||||||
|
sprintf (string, "%s/lib%s%s%s", search->name,
|
||||||
|
filename, arch, EXTRA_SHLIB_EXTENSION);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (! ldfile_try_open_bfd (string, entry))
|
if (! ldfile_try_open_bfd (string, entry))
|
||||||
{
|
{
|
||||||
/* It failed using .so, try again with .sl for oddball systems
|
free (string);
|
||||||
that use a different naming scheme (ie hpux). */
|
return false;
|
||||||
sprintf (string, "%s/lib%s%s.sl", search->name, filename, arch);
|
|
||||||
|
|
||||||
if (! ldfile_try_open_bfd (string, entry))
|
|
||||||
{
|
|
||||||
free (string);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entry->filename = string;
|
entry->filename = string;
|
||||||
|
@ -133,12 +140,12 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
|
||||||
if (bfd_check_format (entry->the_bfd, bfd_object)
|
if (bfd_check_format (entry->the_bfd, bfd_object)
|
||||||
&& (entry->the_bfd->flags & DYNAMIC) != 0)
|
&& (entry->the_bfd->flags & DYNAMIC) != 0)
|
||||||
{
|
{
|
||||||
char *filname, *needed_name;
|
char *needed_name;
|
||||||
|
|
||||||
ASSERT (entry->is_archive && entry->search_dirs_flag);
|
ASSERT (entry->is_archive && entry->search_dirs_flag);
|
||||||
|
|
||||||
/* Rather than duplicating the logic above. Just use the
|
/* Rather than duplicating the logic above. Just use the
|
||||||
filename we recorded earlier.o
|
filename we recorded earlier.
|
||||||
|
|
||||||
First strip off everything before the last '/'. */
|
First strip off everything before the last '/'. */
|
||||||
filename = strrchr (entry->filename, '/');
|
filename = strrchr (entry->filename, '/');
|
||||||
|
|
Loading…
Reference in a new issue