bdrewery f4f3cadf4f Fix dlsym(RTLD_NEXT) handling to only return the next library in last library cases.
The root of the problem here is that TAILQ_FOREACH_FROM will default to
the head of the list if passed NULL, which will be the case if there are
no libraries loaded after this one.  Thus all libraries, including the
current, were iterated in that case rather than none.

This was broken in r294373.

Reviewed by:	markj (earlier version), cem, kib, ngie
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7216
2016-07-15 19:07:00 +00:00
..
2015-06-13 19:20:56 +00:00
2016-06-14 16:55:05 +00:00
2016-02-27 02:11:00 +00:00
MFH
2016-03-02 16:14:46 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2016-06-14 16:55:05 +00:00
2015-06-13 19:20:56 +00:00
MFH
2016-03-02 16:14:46 +00:00
2015-11-26 01:14:40 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00
2015-06-13 19:20:56 +00:00