aelflod and aslod now default to not showing the memory dump.
This commit is contained in:
parent
91c15c1c63
commit
408b69b17d
|
@ -2,7 +2,7 @@
|
||||||
.SH NAME
|
.SH NAME
|
||||||
aelflod \- ACK ELF loader
|
aelflod \- ACK ELF loader
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
aelflod [-h] inputfile outputfile
|
aelflod [-h] [-v] inputfile outputfile
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.I aelflod
|
.I aelflod
|
||||||
converts an absolute ack.out file into a simple binary memory
|
converts an absolute ack.out file into a simple binary memory
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* $Source$
|
|
||||||
* $State$
|
|
||||||
*
|
|
||||||
* Simple tool to produce an utterly basic ELF executable
|
* Simple tool to produce an utterly basic ELF executable
|
||||||
* from an absolute ack.out file. Suitable for operating
|
* from an absolute ack.out file. Suitable for operating
|
||||||
* systems like Linux.
|
* systems like Linux.
|
||||||
|
@ -24,6 +21,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "out.h"
|
#include "out.h"
|
||||||
|
@ -68,6 +66,8 @@ const char elf_le_ident_string[] = {
|
||||||
|
|
||||||
char hdr[HDR_LENGTH] ;
|
char hdr[HDR_LENGTH] ;
|
||||||
|
|
||||||
|
bool verbose = false;
|
||||||
|
|
||||||
/* Segment numbers understood by aelflod. */
|
/* Segment numbers understood by aelflod. */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -299,6 +299,10 @@ int main(int argc, char* argv[])
|
||||||
elfmachine = atoi(&argv[1][2]);
|
elfmachine = atoi(&argv[1][2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'v':
|
||||||
|
verbose = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
syntaxerror:
|
syntaxerror:
|
||||||
fatal("syntax error --- try -h for help");
|
fatal("syntax error --- try -h for help");
|
||||||
|
@ -451,8 +455,9 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
/* Summarise what we've done. */
|
/* Summarise what we've done. */
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
{
|
{
|
||||||
long ss = 0;
|
uint32_t ss = 0;
|
||||||
printf(" address length\n");
|
printf(" address length\n");
|
||||||
printf(" ehdr : %08"PRIx32" %08"PRIx32"\n", outsect[TEXT].os_base & ~0x1FFF, codeoffset);
|
printf(" ehdr : %08"PRIx32" %08"PRIx32"\n", outsect[TEXT].os_base & ~0x1FFF, codeoffset);
|
||||||
printf(" text : %08"PRIx32" %08"PRIx32"\n", outsect[TEXT].os_base, outsect[TEXT].os_size);
|
printf(" text : %08"PRIx32" %08"PRIx32"\n", outsect[TEXT].os_base, outsect[TEXT].os_size);
|
||||||
|
@ -463,7 +468,7 @@ int main(int argc, char* argv[])
|
||||||
ss += outsect[ROM].os_size;
|
ss += outsect[ROM].os_size;
|
||||||
ss += outsect[DATA].os_size;
|
ss += outsect[DATA].os_size;
|
||||||
ss += outsect[BSS].os_size;
|
ss += outsect[BSS].os_size;
|
||||||
printf("TOTAL : %08lX\n", ss);
|
printf("TOTAL : %08"PRIx32"\n", ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.SH NAME
|
.SH NAME
|
||||||
aslod \- ACK simple loader
|
aslod \- ACK simple loader
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
aslod [-h] inputfile outputfile
|
aslod [-h] [-v] inputfile outputfile
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.I aslod
|
.I aslod
|
||||||
converts an absolute ack.out file into a simple binary memory
|
converts an absolute ack.out file into a simple binary memory
|
||||||
|
|
|
@ -14,14 +14,12 @@
|
||||||
* CVS...)
|
* CVS...)
|
||||||
*
|
*
|
||||||
* dtrg, 2006-10-17
|
* dtrg, 2006-10-17
|
||||||
*
|
|
||||||
* $Source$
|
|
||||||
* $State$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -53,6 +51,8 @@ FILE* output; /* Output stream */
|
||||||
|
|
||||||
char hdr[HDR_LENGTH] ;
|
char hdr[HDR_LENGTH] ;
|
||||||
|
|
||||||
|
bool verbose = false;
|
||||||
|
|
||||||
/* Segment numbers understood by aslod. */
|
/* Segment numbers understood by aslod. */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -206,6 +206,10 @@ int main(int argc, char* argv[])
|
||||||
program);
|
program);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
case 'v':
|
||||||
|
verbose = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
syntaxerror:
|
syntaxerror:
|
||||||
fatal("syntax error --- try -h for help");
|
fatal("syntax error --- try -h for help");
|
||||||
|
@ -301,8 +305,9 @@ int main(int argc, char* argv[])
|
||||||
|
|
||||||
/* Summarise what we've done. */
|
/* Summarise what we've done. */
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
{
|
{
|
||||||
long ss = 0;
|
uint32_t ss = 0;
|
||||||
printf(" base : %08"PRIx32"\n", outsect[TEXT].os_base) ;
|
printf(" base : %08"PRIx32"\n", outsect[TEXT].os_base) ;
|
||||||
printf(" text = %08"PRIx32"\n", outsect[TEXT].os_size);
|
printf(" text = %08"PRIx32"\n", outsect[TEXT].os_size);
|
||||||
printf(" rom = %08"PRIx32"\n", outsect[ROM].os_size);
|
printf(" rom = %08"PRIx32"\n", outsect[ROM].os_size);
|
||||||
|
@ -312,7 +317,7 @@ int main(int argc, char* argv[])
|
||||||
ss += outsect[ROM].os_size;
|
ss += outsect[ROM].os_size;
|
||||||
ss += outsect[DATA].os_size;
|
ss += outsect[DATA].os_size;
|
||||||
ss += outsect[BSS].os_size;
|
ss += outsect[BSS].os_size;
|
||||||
printf("TOTAL = %08lX\n", ss);
|
printf("TOTAL = %08"PRIx32"\n", ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue