This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix dynamic linker issue with bind-now
- From: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: Petar Jovanovic <petar dot jovanovic at rt-rk dot com>, libc-alpha at sourceware dot org, petar dot jovanovic at imgtec dot com
- Date: Mon, 23 Mar 2015 20:08:10 +0000 (GMT)
- Subject: Re: [PATCH] Fix dynamic linker issue with bind-now
- Authentication-results: sourceware.org; auth=none
- References: <1408493406-86741-1-git-send-email-petar dot jovanovic at rt-rk dot com> <1408493406-86741-2-git-send-email-petar dot jovanovic at rt-rk dot com> <000a01cfe8dd$488fbdf0$d9af39d0$ at rt-rk dot com> <20141021213320 dot GA25185 at vapier> <000301d00e87$8284f5f0$878ee1d0$ at rt-rk dot com> <CANu=DmjNC0iFRcHiifhgb0x5ot1t1gCOEktKpq9irt+j_A-5_Q at mail dot gmail dot com> <002a01d010ee$3115af70$93410e50$ at rt-rk dot com> <m2fvct6rui dot fsf at linux-m68k dot org> <000201d011b9$a9e6edd0$fdb4c970$ at rt-rk dot com> <20150302062928 dot GX19363 at vapier>
On Mon, 2 Mar 2015, Mike Frysinger wrote:
> > +tst-split-dynreloc-ENV = LD_BIND_NOW=1
>
> do you need to use the env var ? pass -Wl,-z,now via LDFLAGS instead ?
FWIW the two arrangements are not equivalent AFAIK, a binary created with
`-Wl,-z,now' may not be the same as one made without that option (beyond
the obvious difference coming from the absence or the presence of the
DT_BIND_NOW dynamic tag), and consequently different ld.so's execution
paths may be exercised respectively.
NB this static linker's property may be target specific and I haven't
looked into the details of the issue concerned here, so this observation
may not be relevant here. I think it's worth noting anyway just in case,
as I had unpleasant surprises in the past with it, so it would be good to
save other people from falling into this trap too.
Maciej