diff options
author | dg <dg@FreeBSD.org> | 1994-01-19 15:00:37 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-01-19 15:00:37 +0000 |
commit | 50dde40ae01167fd87a189d3b72dbe8385d2836e (patch) | |
tree | 1ecac9aa4fece7b44fb878f393c6e5165518d932 | |
parent | 5c5595f3d48bdb876a1f869d39ef9a5b0dd85f91 (diff) | |
download | FreeBSD-src-50dde40ae01167fd87a189d3b72dbe8385d2836e.zip FreeBSD-src-50dde40ae01167fd87a189d3b72dbe8385d2836e.tar.gz |
Removed dependance on EX_DYNAMIC in making decisions on the magic number.
-rw-r--r-- | gnu/usr.bin/ld/i386/md.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/ld/i386/md.h | 4 | ||||
-rw-r--r-- | gnu/usr.bin/ld/ld.c | 5 | ||||
-rw-r--r-- | libexec/rtld-aout/i386/md.c | 4 | ||||
-rw-r--r-- | libexec/rtld-aout/i386/md.h | 4 |
5 files changed, 12 insertions, 9 deletions
diff --git a/gnu/usr.bin/ld/i386/md.c b/gnu/usr.bin/ld/i386/md.c index 02fda41..f78c6cc 100644 --- a/gnu/usr.bin/ld/i386/md.c +++ b/gnu/usr.bin/ld/i386/md.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: md.c,v 1.6 1993/12/02 01:03:04 jkh Exp $ + * $Id: md.c,v 1.7 1994/01/03 18:35:35 davidg Exp $ */ #include <sys/param.h> @@ -98,7 +98,7 @@ md_init_header(hp, magic, flags) struct exec *hp; int magic, flags; { - if (!netzmagic && (magic == ZMAGIC) && !(link_mode & DYNAMIC)) { + if (!netzmagic && (magic == ZMAGIC)) { hp->a_midmag = magic; } else { if (netzmagic) diff --git a/gnu/usr.bin/ld/i386/md.h b/gnu/usr.bin/ld/i386/md.h index c7271b3..7286a74 100644 --- a/gnu/usr.bin/ld/i386/md.h +++ b/gnu/usr.bin/ld/i386/md.h @@ -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: md.h,v 1.6 1993/12/11 12:02:05 jkh Exp $ + * $Id: md.h,v 1.7 1994/01/03 18:35:36 davidg Exp $ */ @@ -48,6 +48,8 @@ #define N_SET_FLAG(ex,f) (netzmagic ? \ N_SETMAGIC_NET(ex,N_GETMAGIC_NET(ex), MID_MACHINE, \ N_GETFLAG_NET(ex)|(f)) : \ + N_GETMAGIC(ex) == ZMAGIC ? \ + N_SETMAGIC(ex,ZMAGIC,0,N_GETFLAG(ex)|(f)) : \ N_SETMAGIC(ex,N_GETMAGIC(ex), MID_MACHINE, \ N_GETFLAG(ex)|(f))) diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index 18af1c4..ad6f9a6 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)ld.c 6.10 (Berkeley) 5/22/91"; Set, indirect, and warning symbol features added by Randy Smith. */ /* - * $Id: ld.c,v 1.17 1993/12/22 23:28:08 jkh Exp $ + * $Id: ld.c,v 1.18 1994/01/03 18:35:14 davidg Exp $ */ /* Define how to initialize system-dependent header fields. */ @@ -2176,8 +2176,7 @@ write_header () { int flags = (rrs_section_type == RRS_FULL) ? EX_DYNAMIC : 0; - if (netzmagic || magic == QMAGIC || (link_mode & DYNAMIC)) - N_SET_FLAG (outheader, flags); + N_SET_FLAG (outheader, flags); outheader.a_text = text_size; outheader.a_data = data_size; diff --git a/libexec/rtld-aout/i386/md.c b/libexec/rtld-aout/i386/md.c index 02fda41..f78c6cc 100644 --- a/libexec/rtld-aout/i386/md.c +++ b/libexec/rtld-aout/i386/md.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: md.c,v 1.6 1993/12/02 01:03:04 jkh Exp $ + * $Id: md.c,v 1.7 1994/01/03 18:35:35 davidg Exp $ */ #include <sys/param.h> @@ -98,7 +98,7 @@ md_init_header(hp, magic, flags) struct exec *hp; int magic, flags; { - if (!netzmagic && (magic == ZMAGIC) && !(link_mode & DYNAMIC)) { + if (!netzmagic && (magic == ZMAGIC)) { hp->a_midmag = magic; } else { if (netzmagic) diff --git a/libexec/rtld-aout/i386/md.h b/libexec/rtld-aout/i386/md.h index c7271b3..7286a74 100644 --- a/libexec/rtld-aout/i386/md.h +++ b/libexec/rtld-aout/i386/md.h @@ -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: md.h,v 1.6 1993/12/11 12:02:05 jkh Exp $ + * $Id: md.h,v 1.7 1994/01/03 18:35:36 davidg Exp $ */ @@ -48,6 +48,8 @@ #define N_SET_FLAG(ex,f) (netzmagic ? \ N_SETMAGIC_NET(ex,N_GETMAGIC_NET(ex), MID_MACHINE, \ N_GETFLAG_NET(ex)|(f)) : \ + N_GETMAGIC(ex) == ZMAGIC ? \ + N_SETMAGIC(ex,ZMAGIC,0,N_GETFLAG(ex)|(f)) : \ N_SETMAGIC(ex,N_GETMAGIC(ex), MID_MACHINE, \ N_GETFLAG(ex)|(f))) |