Next batch of changes!
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "arch.h"
|
||||
@@ -15,6 +11,7 @@ static char rcsid[] = "$Id$";
|
||||
#include "debug.h"
|
||||
#include "memory.h"
|
||||
#include "defs.h"
|
||||
#include "object.h"
|
||||
|
||||
#define ENDLIB ((long)0)
|
||||
|
||||
|
||||
13
util/led/archive.h
Normal file
13
util/led/archive.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* The Amsterdam Compiler Kit
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef UTIL_LED_ARCHIVE_H
|
||||
#define UTIL_LED_ARCHIVE_H
|
||||
|
||||
/* util/led/archive.c */
|
||||
void arch(void);
|
||||
void arch2(void);
|
||||
|
||||
#endif /* UTIL_LED_ARCHIVE_H */
|
||||
|
||||
@@ -2,16 +2,15 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <out.h>
|
||||
#include "const.h"
|
||||
|
||||
|
||||
|
||||
static short nerrors = 0;
|
||||
static void diag(char *, char *, va_list);
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "arch.h"
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <out.h>
|
||||
#include "const.h"
|
||||
#include "arch.h"
|
||||
@@ -13,6 +9,7 @@ static char rcsid[] = "$Id$";
|
||||
#include "defs.h"
|
||||
#include "orig.h"
|
||||
#include "scan.h"
|
||||
#include "object.h"
|
||||
|
||||
extern bool incore;
|
||||
extern unsigned short NLocals;
|
||||
@@ -22,8 +19,9 @@ static void adjust_names(struct outname *name, struct outhead *head, char *chars
|
||||
static void handle_relos(struct outhead *head, struct outsect *sects, struct outname *names);
|
||||
static void put_locals(struct outname *name, unsigned int nnames);
|
||||
static void compute_origins(struct outsect *sect, unsigned int nsect);
|
||||
|
||||
static put_dbug(long offdbug);
|
||||
#ifdef SYMDBUG
|
||||
static void put_dbug(long offdbug);
|
||||
#endif
|
||||
/*
|
||||
* We know all there is to know about the current module.
|
||||
* Now we relocate the values in the emitted bytes and write
|
||||
@@ -235,7 +233,7 @@ static void compute_origins(struct outsect *sect, unsigned int nsect)
|
||||
* Write out what is after the string area. This is likely to be
|
||||
* debugging information.
|
||||
*/
|
||||
static put_dbug(long offdbug)
|
||||
static void put_dbug(long offdbug)
|
||||
{
|
||||
char buf[512];
|
||||
int nbytes;
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* led - linkage editor for ACK assemblers output format
|
||||
*/
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Memory manager. Memory is divided into NMEMS pieces. There is a struct
|
||||
* for each piece telling where it is, how many bytes are used, and how may
|
||||
@@ -22,6 +18,7 @@ static char rcsid[] = "$Id$";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <out.h>
|
||||
#include "const.h"
|
||||
#include "assert.h"
|
||||
@@ -29,6 +26,9 @@ static char rcsid[] = "$Id$";
|
||||
#include "arch.h"
|
||||
#include "memory.h"
|
||||
#include "defs.h"
|
||||
#include "object.h"
|
||||
|
||||
#include <missing_proto.h>
|
||||
|
||||
static ind_t move_up(int piece, ind_t incr);
|
||||
static bool compact(int piece, ind_t incr, int flag);
|
||||
@@ -56,7 +56,7 @@ int sbreak(ind_t incr)
|
||||
if ((refused && refused < incr) ||
|
||||
(sizeof(char *) < sizeof(long) &&
|
||||
(inc != incr || BASE + inc < BASE)) ||
|
||||
brk(BASE + incr) == -1) {
|
||||
brk(BASE + incr) == (void *)-1) {
|
||||
if (!refused || refused > incr)
|
||||
refused = incr;
|
||||
return -1;
|
||||
@@ -74,17 +74,16 @@ void init_core()
|
||||
char *base;
|
||||
ind_t total_size;
|
||||
struct memory *mem;
|
||||
extern char *sbrk();
|
||||
|
||||
#include "mach.c"
|
||||
#define ALIGN 8 /* minimum alignment for pieces */
|
||||
#define AT_LEAST (ind_t)2*ALIGN /* See comment about string areas. */
|
||||
|
||||
total_size = (ind_t)0; /* Will accumulate the sizes. */
|
||||
BASE = base = sbrk(0); /* First free. */
|
||||
BASE = base = (char *)sbrk(0); /* First free. */
|
||||
if ((int)base % ALIGN) {
|
||||
base = sbrk(ALIGN - (int)base % ALIGN);
|
||||
BASE = base = sbrk(0);
|
||||
base = (char *)sbrk(ALIGN - (int)base % ALIGN);
|
||||
BASE = base = (char *)sbrk(0);
|
||||
}
|
||||
/*
|
||||
* String areas are special-cased. The first byte is unused as a way to
|
||||
@@ -537,7 +536,7 @@ void write_bytes()
|
||||
extern int flagword;
|
||||
extern struct outhead outhead;
|
||||
extern struct outsect outsect[];
|
||||
extern char *outputname;
|
||||
/* extern char *outputname; */
|
||||
int sectionno = 0;
|
||||
|
||||
nsect = outhead.oh_nsect;
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <out.h>
|
||||
#include "const.h"
|
||||
#include "memory.h"
|
||||
#include "object.h"
|
||||
#include "defs.h"
|
||||
|
||||
static void generate_section_names();
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <out.h>
|
||||
#include "const.h"
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "out.h"
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If everything is kept in core, we must save some things for the second pass.
|
||||
*/
|
||||
|
||||
@@ -2,17 +2,13 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef SYMDBUG
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#endif /* SYMDBUG */
|
||||
#include "arch.h"
|
||||
#include "out.h"
|
||||
#include "ranlib.h"
|
||||
@@ -22,6 +18,7 @@ static char rcsid[] = "$Id$";
|
||||
#include "scan.h"
|
||||
#include "debug.h"
|
||||
#include "defs.h"
|
||||
#include "object.h"
|
||||
|
||||
#define READ 0
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Symbol table management.
|
||||
*/
|
||||
|
||||
@@ -2,19 +2,21 @@
|
||||
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
||||
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
||||
*/
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include "out.h"
|
||||
#include "const.h"
|
||||
#include "assert.h"
|
||||
#include "memory.h"
|
||||
#include "arch.h"
|
||||
#include "defs.h"
|
||||
#include "object.h"
|
||||
|
||||
extern struct outhead outhead;
|
||||
extern struct outsect outsect[];
|
||||
extern int flagword;
|
||||
|
||||
Reference in New Issue
Block a user