ack/util/amisc/aelflod.1

60 lines
1.6 KiB
Groff
Raw Normal View History

Tune the installed manual pages. This commit slightly improves the formatting of the manuals. My OpenBSD machine uses mandoc(1) to format manuals. I check the manuals with `mandoc -T lint` and fix most of the warnings. I also make other changes where mandoc didn't warn me. roff(7) says, "Each sentence should terminate at the end of an input line," but we often forgot this rule. I insert some newlines after sentences that had ended mid-line. roff(7) also says that blank lines "are only permitted within literal contexts." I delete blank lines. This removes some extra blank lines from mandoc's output. If I do want a blank line in the output, I call ".sp 1" to make it in man(7). If I want a blank line in the source, but not the output, I put a plain dot "." so roff ignores it. Hyphens used for command-line options, like \-a, should be escaped by a backslash. I insert a few missing backslashes. mandoc warns if the date in .TH doesn't look like a date. Our manuals had a missing date or the RCS keyword "$Revision$". Git doesn't expand RCS keywords. I put in today's date, 2017-01-18. Some manuals used tab characters in filled mode. That doesn't work. I use .nf to turn off filled mode, or I use .IP in man(7) to make the indentation without a tab character. ack(1) defined a macro .SB but never used it, so I delete the definition. I also remove a call to the missing macro .RF. mandoc warns about empty paragraphs. I deleted them. mandoc also warned about these macro pairs in anm(1): .SM .B text The .SM did nothing because the .B text is on a different line. I changed each pair to .SB for small bold text. I make a few other small changes.
2017-01-19 04:02:30 +00:00
.TH AELFLOD 1 2017-01-18
.SH NAME
aelflod \- ACK ELF loader
.SH SYNOPSIS
.B aelflod
Tune the installed manual pages. This commit slightly improves the formatting of the manuals. My OpenBSD machine uses mandoc(1) to format manuals. I check the manuals with `mandoc -T lint` and fix most of the warnings. I also make other changes where mandoc didn't warn me. roff(7) says, "Each sentence should terminate at the end of an input line," but we often forgot this rule. I insert some newlines after sentences that had ended mid-line. roff(7) also says that blank lines "are only permitted within literal contexts." I delete blank lines. This removes some extra blank lines from mandoc's output. If I do want a blank line in the output, I call ".sp 1" to make it in man(7). If I want a blank line in the source, but not the output, I put a plain dot "." so roff ignores it. Hyphens used for command-line options, like \-a, should be escaped by a backslash. I insert a few missing backslashes. mandoc warns if the date in .TH doesn't look like a date. Our manuals had a missing date or the RCS keyword "$Revision$". Git doesn't expand RCS keywords. I put in today's date, 2017-01-18. Some manuals used tab characters in filled mode. That doesn't work. I use .nf to turn off filled mode, or I use .IP in man(7) to make the indentation without a tab character. ack(1) defined a macro .SB but never used it, so I delete the definition. I also remove a call to the missing macro .RF. mandoc warns about empty paragraphs. I deleted them. mandoc also warned about these macro pairs in anm(1): .SM .B text The .SM did nothing because the .B text is on a different line. I changed each pair to .SB for small bold text. I make a few other small changes.
2017-01-19 04:02:30 +00:00
[\-a\fInumber\fP] [\-b] [\-h] [\-l] [\-m\fInumber\fP] [\-v]
inputfile outputfile
.SH DESCRIPTION
.I aelflod
converts an absolute ack.out file into a simple binary memory
dump wrapped up in an ELF executable.
It is suitable for producing executables for operating systems
such as Linux.
.PP
.I aelflod
accepts the following flags:
.TP
.BI \-a number
Set the ABI in the ELF header to \fInumber\fP.
The default value is \fI3\fP for Linux.
.TP
.B \-b
Write a big-endian ELF file.
.TP
.B \-h
Print a help message and exit.
.TP
.B \-l
Write a little-endian ELF file.
This is the default.
.TP
.BI \-m number
Set the machine type in the ELF header to \fInumber\fP.
The default value is \fI3\fP for Intel 386 (i386).
Other values are \fI4\fP for Motorola 68000 (m68k)
and \fI20\fP for PowerPC.
.TP
.B \-v
Be verbose.
.PP
The input file must contain exactly four segments: TEXT, ROM,
DATA and BSS, in that order, all occupying contiguous memory.
The file must have all references resolved and be linked to a
fixed address.
The fixed address must be at least 0x54 bytes greater than a
page boundary, in order to make room for the ELF header itself.
.PP
.I aelflod
will write out an ELF header followed by each segment, in order,
ensuring that enough padding is inserted between each segment
to keep the offsets correct.
The created executable will contain just one ELF segment mapped rwx.
.PP
If the input file has symbols, then
.I aelflod
will convert the symbol table to ELF.
The output file has ELF section headers if and only if it has symbols.
.SH "SEE ALSO"
ack.out(5)