mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-24 12:35:55 +08:00
2000-08-23 H.J. Lu <hjl@gnu.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get the current runpath list from bfd_elf_get_runpath_list () before search.
This commit is contained in:
parent
4b853faa33
commit
6dd8c765d3
@ -1,3 +1,9 @@
|
||||
2000-08-23 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Get
|
||||
the current runpath list from bfd_elf_get_runpath_list ()
|
||||
before search.
|
||||
|
||||
2000-08-22 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Search
|
||||
|
@ -570,34 +570,11 @@ static void
|
||||
gld${EMULATION_NAME}_after_open ()
|
||||
{
|
||||
struct bfd_link_needed_list *needed, *l;
|
||||
EOF
|
||||
if [ "x${host}" = "x${target}" ] ; then
|
||||
case " ${EMULATION_LIBPATH} " in
|
||||
*" ${EMULATION_NAME} "*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
struct bfd_link_needed_list *run_path;
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
|
||||
/* We only need to worry about this when doing a final link. */
|
||||
if (link_info.relocateable || link_info.shared)
|
||||
return;
|
||||
|
||||
EOF
|
||||
if [ "x${host}" = "x${target}" ] ; then
|
||||
case " ${EMULATION_LIBPATH} " in
|
||||
*" ${EMULATION_NAME} "*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
run_path = bfd_elf_get_runpath_list (output_bfd, &link_info);
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
|
||||
/* Get the list of files which appear in DT_NEEDED entries in
|
||||
dynamic objects included in the link (often there will be none).
|
||||
For each such file, we want to track down the corresponding
|
||||
@ -612,18 +589,6 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
||||
{
|
||||
struct bfd_link_needed_list *ll;
|
||||
int force;
|
||||
EOF
|
||||
if [ "x${host}" = "x${target}" ] ; then
|
||||
case " ${EMULATION_LIBPATH} " in
|
||||
*" ${EMULATION_NAME} "*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
struct bfd_link_needed_list *rp;
|
||||
int found;
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
|
||||
/* If we've already seen this file, skip it. */
|
||||
for (ll = needed; ll != l; ll = ll->next)
|
||||
@ -658,6 +623,18 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
||||
const char *lib_path;
|
||||
size_t len;
|
||||
search_dirs_type *search;
|
||||
EOF
|
||||
if [ "x${host}" = "x${target}" ] ; then
|
||||
case " ${EMULATION_LIBPATH} " in
|
||||
*" ${EMULATION_NAME} "*)
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
struct bfd_link_needed_list *rp;
|
||||
int found;
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cat >>e${EMULATION_NAME}.c <<EOF
|
||||
|
||||
if (gld${EMULATION_NAME}_search_needed (command_line.rpath_link,
|
||||
l->name, force))
|
||||
@ -683,7 +660,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
||||
break;
|
||||
|
||||
found = 0;
|
||||
for (rp = run_path; !found && rp != NULL; rp = rp->next)
|
||||
rp = bfd_elf_get_runpath_list (output_bfd, &link_info);
|
||||
for (; !found && rp != NULL; rp = rp->next)
|
||||
{
|
||||
found = (rp->by == l->by
|
||||
&& gld${EMULATION_NAME}_search_needed (rp->name,
|
||||
|
Loading…
Reference in New Issue
Block a user