summaryrefslogtreecommitdiffstats
path: root/usr.bin/ldd/ldd.c
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1994-12-23 22:31:35 +0000
committernate <nate@FreeBSD.org>1994-12-23 22:31:35 +0000
commit7f56eb7b93f7774321c3f5924447d96ffcb858b9 (patch)
tree44d4ecee16a0e6d497426a41a2bdd4542c4c3342 /usr.bin/ldd/ldd.c
parent92495f8331471c4b72fe0037463cdac16b87b02e (diff)
downloadFreeBSD-src-7f56eb7b93f7774321c3f5924447d96ffcb858b9.zip
FreeBSD-src-7f56eb7b93f7774321c3f5924447d96ffcb858b9.tar.gz
Updated to recent version of Paul K.'s shlib code. This code has better
warning handling and allows for link-time warnings with a modified version of gas. Note: Not all of the newer bits were updated such as some of the non-x86 machine-dependant code is relevant to FreeBSD right now. Obtained from: NetBSD
Diffstat (limited to 'usr.bin/ldd/ldd.c')
-rw-r--r--usr.bin/ldd/ldd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c
index 1072d80..2f54806 100644
--- a/usr.bin/ldd/ldd.c
+++ b/usr.bin/ldd/ldd.c
@@ -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: ldd.c,v 1.3 1994/02/13 20:42:43 jkh Exp $
+ * $Id: ldd.c,v 1.4 1994/06/15 22:41:03 rich Exp $
*/
#include <sys/types.h>
@@ -91,9 +91,12 @@ char *argv[];
argv++;
continue;
}
- if (read(fd, &hdr, sizeof hdr) != sizeof hdr ||
- !(N_GETFLAG(hdr) & EX_DYNAMIC) ||
- hdr.a_entry < __LDPGSZ) {
+ if (read(fd, &hdr, sizeof hdr) != sizeof hdr
+ || (N_GETFLAG(hdr) & EX_DPMASK) != EX_DYNAMIC
+#if 1 /* Compatibility */
+ || hdr.a_entry < __LDPGSZ
+#endif
+ ) {
warnx("%s: not a dynamic executable", *argv);
(void)close(fd);
OpenPOWER on IntegriCloud