NetBSD Problem Report #218
From gnats Sat Apr 9 14:56:31 1994
Received: from sun2.nsfnet-relay.ac.uk (sun2.nsfnet-relay.ac.uk [128.86.8.45]) by sun-lamp.cs.berkeley.edu (8.6.8/8.6.6) with SMTP id OAA00718 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 9 Apr 1994 14:56:26 -0700
Message-Id: <19040.9404091954@landin.ecs.soton.ac.uk>
Date: Sat, 9 Apr 1994 20:54:39 +0100 (BST)
From: Bob Kemp <rsk@ecs.soton.ac.uk>
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: no subject (file transmission)
>Number: 218
>Category: bin
>Synopsis: "ldd /usr/libexec/ld.so" core dumps with signal 11
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 09 15:05:01 +0000 1994
>Closed-Date: Sat Apr 16 09:49:33 +0000 1994
>Last-Modified:
>Originator: Bob Kemp
>Release:
>Organization:
ECS Dept, Southampton University, UK
>Environment:
-current 05Mar94
System: NetBSD allegory 0.9a ALLEGORY#0 i386
>Description:
The shared library dynamic loader will happily try to
execute shared libraries if they have execute permissions
set. It then core dumps with a signal 11 (segmentation
violation).
The prime example of this is /usr/libexec/ld.so but after
chmod'ing (say) /usr/lib/libc.so.* to add execute bits,
ldd core dumps when run on these too. The "ldd" program
needs an extra test.
>How-To-Repeat:
ldd /usr/libexec/ld.so
>Fix:
If I've understood it right, this fixes things.
*** ldd.c.orig Sat Jan 29 10:24:53 1994
--- ldd.c Fri Apr 8 23:52:04 1994
***************
*** 96,102 ****
continue;
}
if (read(fd, &hdr, sizeof hdr) != sizeof hdr ||
! !(N_GETFLAG(hdr) & EX_DYNAMIC)) {
fprintf(stderr, "%s: not a dynamic executable\n",
*argv);
(void)close(fd);
--- 96,103 ----
continue;
}
if (read(fd, &hdr, sizeof hdr) != sizeof hdr ||
! !(N_GETFLAG(hdr) & EX_DYNAMIC) ||
! hdr.a_entry < 4096) {
fprintf(stderr, "%s: not a dynamic executable\n",
*argv);
(void)close(fd);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: pk
State-Changed-When: Sat Apr 16 02:49:33 PDT 1994
State-Changed-Why:
Fixed by checking a.out's entry point using `__LDPGSZ'.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.