This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld and GNU/Linux ld.so disagree on dependent library search order (?)
I'll give it a shot. Do I have a prayer working from the SRPMs, or do
I need to use the CVS head?
Thanks,
Jeremy
"H. J. Lu" <hjl@lucon.org> writes:
> On Mon, Feb 06, 2006 at 06:25:24PM -0500, Jeremy Brown wrote:
>> Done. Bug 2290 is now open. Please let me know if you need more
>> information.
>>
>
> Can you try this patch?
>
> Thanks.
>
>
> H.J.
> ---
> 2006-02-07 H.J. Lu <hongjiu.lu@intel.com>
>
> PR ld/2290
> * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
> gld${EMULATION_NAME}_check_ld_so_conf before checking default
> search directories for DT_NEEDED entries.
>
> --- ld/emultempl/elf32.em.ld.so 2005-12-08 07:06:38.000000000 -0800
> +++ ld/emultempl/elf32.em 2006-02-07 08:33:46.000000000 -0800
> @@ -919,6 +919,18 @@ cat >>e${EMULATION_NAME}.c <<EOF
>
> EOF
> fi
> +if [ "x${USE_LIBPATH}" = xyes ] ; then
> + case ${target} in
> + *-*-linux-* | *-*-k*bsd*-*)
> + # Linux
> + cat >>e${EMULATION_NAME}.c <<EOF
> + if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
> + break;
> +
> +EOF
> + ;;
> + esac
> +fi
> cat >>e${EMULATION_NAME}.c <<EOF
> len = strlen (l->name);
> for (search = search_head; search != NULL; search = search->next)
> @@ -937,17 +949,6 @@ cat >>e${EMULATION_NAME}.c <<EOF
> if (search != NULL)
> break;
> EOF
> -if [ "x${USE_LIBPATH}" = xyes ] ; then
> - case ${target} in
> - *-*-linux-* | *-*-k*bsd*-*)
> - cat >>e${EMULATION_NAME}.c <<EOF
> - if (gld${EMULATION_NAME}_check_ld_so_conf (l->name, force))
> - break;
> -EOF
> - # Linux
> - ;;
> - esac
> -fi
> cat >>e${EMULATION_NAME}.c <<EOF
> }
>