Fixup the "ld.so failed" message for the case when ld.so finds undefined

symbols.

An easy example to see this is to develop an X program which links
against Xt, but doesn't add -lX11 to the link line.  It will link fine,
but cause run-time errors by ld.so because of missing symbols used by Xt
defined in X11.  This patch makes the errors more readable.

Submitted by:   jdp@polstra.com (John Polstra)
This commit is contained in:
Nate Williams 1995-09-27 23:14:08 +00:00
parent 4d2131fbc9
commit e1ec3d8b3c
2 changed files with 10 additions and 10 deletions

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: rtld.c,v 1.24 1995/05/30 05:01:49 rgrimes Exp $
* $Id: rtld.c,v 1.25 1995/06/27 09:53:19 dfr Exp $
*/
#include <sys/param.h>
@ -276,6 +276,10 @@ struct _dynamic *dp;
/* Load required objects into the process address space */
load_objects(crtp, dp);
/* Fill in some fields in main's __DYNAMIC structure */
crtp->crt_dp->d_entry = &ld_entry;
crtp->crt_dp->d_un.d_sdt->sdt_loaded = link_map_head->som_next;
/* Relocate all loaded objects according to their RRS segments */
for (smp = link_map_head; smp; smp = smp->som_next) {
if (LM_PRIVATE(smp)->spd_flags & RTLD_RTLD)
@ -298,10 +302,6 @@ struct _dynamic *dp;
init_map(smp, ".init", 0);
}
/* Fill in some field in main's __DYNAMIC structure */
crtp->crt_dp->d_entry = &ld_entry;
crtp->crt_dp->d_un.d_sdt->sdt_loaded = link_map_head->som_next;
ddp = crtp->crt_dp->d_debug;
ddp->dd_cc = rt_symbol_head;
if (ddp->dd_in_debugger) {

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: rtld.c,v 1.24 1995/05/30 05:01:49 rgrimes Exp $
* $Id: rtld.c,v 1.25 1995/06/27 09:53:19 dfr Exp $
*/
#include <sys/param.h>
@ -276,6 +276,10 @@ struct _dynamic *dp;
/* Load required objects into the process address space */
load_objects(crtp, dp);
/* Fill in some fields in main's __DYNAMIC structure */
crtp->crt_dp->d_entry = &ld_entry;
crtp->crt_dp->d_un.d_sdt->sdt_loaded = link_map_head->som_next;
/* Relocate all loaded objects according to their RRS segments */
for (smp = link_map_head; smp; smp = smp->som_next) {
if (LM_PRIVATE(smp)->spd_flags & RTLD_RTLD)
@ -298,10 +302,6 @@ struct _dynamic *dp;
init_map(smp, ".init", 0);
}
/* Fill in some field in main's __DYNAMIC structure */
crtp->crt_dp->d_entry = &ld_entry;
crtp->crt_dp->d_un.d_sdt->sdt_loaded = link_map_head->som_next;
ddp = crtp->crt_dp->d_debug;
ddp->dd_cc = rt_symbol_head;
if (ddp->dd_in_debugger) {