summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1998-09-13 13:28:07 +0000
committerrnordier <rnordier@FreeBSD.org>1998-09-13 13:28:07 +0000
commitac5f389299786b41800e6d4bb7ca8c39c173b246 (patch)
tree87d60a306e1a34bcbde7541ff077dd75922e1d91 /usr.sbin
parentc5403b91f2e2a82afb9709a4d6fd26dbce22e1f7 (diff)
downloadFreeBSD-src-ac5f389299786b41800e6d4bb7ca8c39c173b246.zip
FreeBSD-src-ac5f389299786b41800e6d4bb7ca8c39c173b246.tar.gz
Enable client entry point support.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/btxld/btxld.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/btxld/btxld.c b/usr.sbin/btxld/btxld.c
index 0e853e5..51620ac 100644
--- a/usr.sbin/btxld/btxld.c
+++ b/usr.sbin/btxld/btxld.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id:$";
+ "$Id: btxld.c,v 1.1.1.1 1998/09/12 06:49:48 rnordier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -100,6 +100,8 @@ static unsigned format; /* Output format */
static uint32_t centry; /* Client entry address */
static uint32_t lentry; /* Loader entry address */
+static int Eflag; /* Client entry option */
+
static int quiet; /* Inhibit warnings */
static int verbose; /* Display information */
@@ -142,6 +144,7 @@ main(int argc, char *argv[])
break;
case 'E':
centry = optaddr(optarg);
+ Eflag = 1;
break;
case 'e':
lentry = optaddr(optarg);
@@ -239,6 +242,7 @@ btxld(const char *iname)
cwr++;
}
btx.btx_pgctl -= cwr;
+ btx.btx_entry = Eflag ? centry : ihdr.entry;
if (snprintf(name, sizeof(name), "%s.tmp", oname) >= sizeof(name))
errx(2, "%s: Filename too long", oname);
if ((fdo = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1)
OpenPOWER on IntegriCloud