Clean up the led includes.
This commit is contained in:
parent
232545606d
commit
d5a83fd73e
|
@ -6,8 +6,8 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
|
|
|
@ -6,9 +6,11 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <out.h>
|
#include <out.h>
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
|
|
||||||
|
@ -73,7 +75,7 @@ do_verbose(char *format, ...)
|
||||||
static void
|
static void
|
||||||
diag(char *tail, char *format, va_list ap)
|
diag(char *tail, char *format, va_list ap)
|
||||||
{
|
{
|
||||||
extern char *progname, *archname, *modulname;
|
extern char *progname, *archname, *modulname;
|
||||||
|
|
||||||
fprintf(stderr, "%s: ", progname);
|
fprintf(stderr, "%s: ", progname);
|
||||||
if (archname && modulname)
|
if (archname && modulname)
|
||||||
|
|
|
@ -6,8 +6,10 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include "out.h"
|
#include "out.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <out.h>
|
#include <out.h>
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
|
@ -11,7 +11,9 @@ static char rcsid[] = "$Id$";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <out.h>
|
#include <out.h>
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
@ -168,7 +170,7 @@ first_pass(argv)
|
||||||
case 'c':
|
case 'c':
|
||||||
/*
|
/*
|
||||||
* Leave relocation information in the output, so that
|
* Leave relocation information in the output, so that
|
||||||
* a next pass can see where relocation was done. The
|
* a next pass can see where relocation was done. The
|
||||||
* resulting output however is no longer relocatable.
|
* resulting output however is no longer relocatable.
|
||||||
*/
|
*/
|
||||||
flagword &= ~RFLAG;
|
flagword &= ~RFLAG;
|
||||||
|
|
|
@ -22,6 +22,9 @@ static char rcsid[] = "$Id$";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <out.h>
|
#include <out.h>
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
|
@ -112,7 +115,7 @@ init_core()
|
||||||
incore = FALSE; /* In core strategy failed. */
|
incore = FALSE; /* In core strategy failed. */
|
||||||
if (sbreak(AT_LEAST) == -1)
|
if (sbreak(AT_LEAST) == -1)
|
||||||
fatal("no core at all");
|
fatal("no core at all");
|
||||||
|
|
||||||
base = BASE;
|
base = BASE;
|
||||||
for (mem = mems; mem < &mems[NMEMS]; mem++) {
|
for (mem = mems; mem < &mems[NMEMS]; mem++) {
|
||||||
mem->mem_base = base;
|
mem->mem_base = base;
|
||||||
|
@ -198,15 +201,15 @@ compact(piece, incr, flag)
|
||||||
gain = (mem->mem_full + incr) >> SHIFT_COUNT;
|
gain = (mem->mem_full + incr) >> SHIFT_COUNT;
|
||||||
if (incr < gain) incr = gain;
|
if (incr < gain) incr = gain;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First, check that moving will result in enough space
|
* First, check that moving will result in enough space
|
||||||
*/
|
*/
|
||||||
if (flag != FREEZE) {
|
if (flag != FREEZE) {
|
||||||
gain = mem->mem_left;
|
gain = mem->mem_left;
|
||||||
for (mem = &mems[piece-1]; mem >= &mems[0]; mem--) {
|
for (mem = &mems[piece-1]; mem >= &mems[0]; mem--) {
|
||||||
/*
|
/*
|
||||||
* Don't give it all away!
|
* Don't give it all away!
|
||||||
* If this does not give us enough, bad luck
|
* If this does not give us enough, bad luck
|
||||||
*/
|
*/
|
||||||
if (flag == FORCED)
|
if (flag == FORCED)
|
||||||
|
@ -224,8 +227,8 @@ compact(piece, incr, flag)
|
||||||
}
|
}
|
||||||
if (min == piece)
|
if (min == piece)
|
||||||
for (mem = &mems[piece+1]; mem <= &mems[NMEMS - 1]; mem++) {
|
for (mem = &mems[piece+1]; mem <= &mems[NMEMS - 1]; mem++) {
|
||||||
/*
|
/*
|
||||||
* Don't give it all away!
|
* Don't give it all away!
|
||||||
* If this does not give us enough, bad luck
|
* If this does not give us enough, bad luck
|
||||||
*/
|
*/
|
||||||
if (flag == FORCED)
|
if (flag == FORCED)
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <out.h>
|
#include <out.h>
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
@ -60,7 +64,7 @@ generate_section_names()
|
||||||
extern struct outsect outsect[];
|
extern struct outsect outsect[];
|
||||||
extern char *core_alloc();
|
extern char *core_alloc();
|
||||||
|
|
||||||
size = (long)outhead.oh_nsect * sizeof(struct outname);
|
size = (long)outhead.oh_nsect * sizeof(struct outname);
|
||||||
name = (struct outname *)core_alloc(ALLOGLOB, size);
|
name = (struct outname *)core_alloc(ALLOGLOB, size);
|
||||||
if (name == (struct outname *)0)
|
if (name == (struct outname *)0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
int infile; /* The current input file. */
|
int infile; /* The current input file. */
|
||||||
|
|
||||||
rd_fatal()
|
rd_fatal()
|
||||||
|
|
|
@ -10,8 +10,10 @@ static char rcsid[] = "$Id$";
|
||||||
* If everything is kept in core, we must save some things for the second pass.
|
* If everything is kept in core, we must save some things for the second pass.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "out.h"
|
#include "out.h"
|
||||||
|
|
|
@ -6,8 +6,10 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#ifdef SYMDBUG
|
#ifdef SYMDBUG
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
@ -10,8 +10,10 @@ static char rcsid[] = "$Id$";
|
||||||
* Symbol table management.
|
* Symbol table management.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include "out.h"
|
#include "out.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
@ -49,7 +51,7 @@ init_symboltable()
|
||||||
* in the hash table is followed. If the names match, a pointer to the outname
|
* in the hash table is followed. If the names match, a pointer to the outname
|
||||||
* in this element of the list is returned. When a match cannot be found,
|
* in this element of the list is returned. When a match cannot be found,
|
||||||
* NIL is returned.
|
* NIL is returned.
|
||||||
*/
|
*/
|
||||||
struct outname *
|
struct outname *
|
||||||
searchname(string, hashval)
|
searchname(string, hashval)
|
||||||
char *string;
|
char *string;
|
||||||
|
@ -74,7 +76,7 @@ searchname(string, hashval)
|
||||||
debug("found %x, %x, %lx\n",
|
debug("found %x, %x, %lx\n",
|
||||||
name->on_type, name->on_desc, name->on_valu, 0);
|
name->on_type, name->on_desc, name->on_valu, 0);
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
symindex = sym->sy_next;
|
symindex = sym->sy_next;
|
||||||
}
|
}
|
||||||
/* Not found. */
|
/* Not found. */
|
||||||
|
|
|
@ -6,8 +6,10 @@
|
||||||
static char rcsid[] = "$Id$";
|
static char rcsid[] = "$Id$";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "out.h"
|
#include "out.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
|
@ -75,7 +77,7 @@ end_write()
|
||||||
for (sectindex = 0; sectindex < outhead.oh_nsect; sectindex++)
|
for (sectindex = 0; sectindex < outhead.oh_nsect; sectindex++)
|
||||||
wrt_name(sectname(sectindex), 1);
|
wrt_name(sectname(sectindex), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
wrt_emit(emit, sectindex, cnt)
|
wrt_emit(emit, sectindex, cnt)
|
||||||
char *emit;
|
char *emit;
|
||||||
int sectindex;
|
int sectindex;
|
||||||
|
|
Loading…
Reference in a new issue