program text). HDR's standard fields are already correct, except that
this adjustment to the `a_text' field has not yet been made;
thus, the amount of offset can depend on the data in the file.
-
+
* A_TEXT_SEEK(HDR)
If defined, this macro specifies the number of bytes to seek into the
#ifndef CANNOT_DUMP /* all rest of file! */
-#ifdef COFF
+#if defined(COFF) && defined(HAVE_COFF_H)
#include <coff.h>
-#else
-#ifdef COFF_ENCAPSULATE
-int need_coff_header = 1;
-#include <coff-encap/a.out.encap.h> /* The location might be a poor assumption */
-#else
#ifdef MSDOS
#if __DJGPP__ > 1
#include <fcntl.h> /* for O_RDONLY, O_RDWR */
#include <crt0.h> /* for _crt0_startup_flags and its bits */
static int save_djgpp_startup_flags;
-#endif
-#include <coff.h>
+#endif /* __DJGPP__ > 1 */
#define filehdr external_filehdr
#define scnhdr external_scnhdr
#define syment external_syment
unsigned long text_start;/* base of text used for this file */
unsigned long data_start;/* base of data used for this file */
};
-
-
-#else /* not MSDOS */
-#include <a.out.h>
#endif /* not MSDOS */
-#endif
+#else /* not COFF */
+#ifdef COFF_ENCAPSULATE
+int need_coff_header = 1;
+#include <coff-encap/a.out.encap.h> /* The location might be a poor assumption */
+#else /* not COFF_ENCAPSULATE */
+#include <a.out.h>
+#endif /* not COFF_ENCAPSULATE */
#endif /* not COFF */
/* Define getpagesize if the system does not.
#else /* not HPUX */
-#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (COFF_ENCAPSULATE) && !defined (LINUX)
+#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (COFF_ENCAPSULATE) && !defined (GNU_LINUX)
static struct bhdr hdr, ohdr;
#define a_magic fmagic
#define a_text tsize
{
close (new);
/* unlink (new_name); /* Failed, unlink new a.out */
- return -1;
+ return -1;
}
close (new);
PERROR (new_name);
}
-#if 0 /* This #ifndef caused a bug on Linux when using QMAGIC. */
+#if 0 /* This #ifndef caused a bug on GNU/Linux when using QMAGIC. */
/* This adjustment was done above only #ifndef NO_REMAP,
so only undo it now #ifndef NO_REMAP. */
/* #ifndef NO_REMAP */
char c;
int mcount_address, mcount_offset, count;
extern char *_execname;
-
+
/* The use of _execname is incompatible with RISCiX 1.1 */
sprintf (command, "nm %s | fgrep mcount", _execname);
{
sprintf (errbuf, "Failed to execute the command '%s'\n", command);
PERROR (errbuf);
- }
+ }
sscanf(address_text, "%x", &mcount_address);
ptr = (char *) unexec_text_start;
{
register int i, nwrite, ret;
char buf[80];
+#ifndef USE_CRT_DLL
extern int errno;
+#endif
/* This is the normal amount to write at once.
It is the size of block that NFS uses. */
int writesize = 1 << 13;
#endif /* COFF */
#endif /* not CANNOT_DUMP */
+
+/* arch-tag: 62409b69-e27a-4a7c-9413-0210d6b54e7f
+ (do not change this comment) */