Skip to content

Commit abd021c

Browse files
committed
Add goto-cc man page
This was built using help2man and then manually expanded. Also fixes that goto-cc --export-file-local-symbols was never documented in its --help output.
1 parent d46627d commit abd021c

File tree

4 files changed

+118
-3
lines changed

4 files changed

+118
-3
lines changed

doc/man/goto-cc.1

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/man/goto-cc.1

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
.TH GOTO-CC "1" "June 2022" "goto-cc-5.59.0" "User Commands"
2+
.SH NAME
3+
goto\-cc \- C/C++ to goto compiler
4+
.SH SYNOPSIS
5+
.B goto-cc [options]
6+
7+
.B goto-gcc [options]
8+
9+
.B goto-ld [options]
10+
11+
.B goto-as [options]
12+
13+
.B goto-bcc [options]
14+
15+
.B goto-armcc [options]
16+
17+
.B goto-cw [options]
18+
19+
.SH DESCRIPTION
20+
.B goto\-cc
21+
reads source code, and generates a goto-binary. Its
22+
command-line interface is designed to mimic that of
23+
.BR gcc (1).
24+
Note in particular that \fBgoto-cc\fR distinguishes between compiling
25+
and linking phases, just as \fBgcc\fR(1) does. \fBcbmc\fR(1) expects a goto-binary
26+
for which linking has been completed.
27+
.PP
28+
The basename of the file that is used to invoke \fBgoto-cc\fR controls which
29+
behavior will be emulated. This is typically accomplished by using symbolic
30+
links.
31+
.IP
32+
\fBgoto-cc\fR: invokes the default system compiler as preprocessor and just
33+
builds a goto-binary.
34+
.IP
35+
\fBgoto-gcc\fR: invokes \fBgcc\fR(1) as preprocessor and builds an \fBelf\fR(5)
36+
object file including an additional \fIgoto-cc\fR section that holds the goto
37+
binary.
38+
.IP
39+
\fBgoto-ld\fR: only performs linking, and also builds an \fBelf\fR(5) object as
40+
above.
41+
.IP
42+
\fBgoto-as\fR: invokes the system assembler \fBas\fR(1) and includes the
43+
original assembly source as a string in the output file.
44+
.IP
45+
\fBgoto-bcc\fR: invokes \fBbcc\fR(1) as preprocessor.
46+
.IP
47+
\fBgoto-armcc\fR: invokes \fBarmcc\fR as preprocessor and enables support for
48+
the ARM's C dialect and command-line options.
49+
.IP
50+
\fBgoto-cw\fR: invokes \fBmwcceppc\fR as preprocessor and enables support for
51+
CodeWarrior's C dialect and command-line options.
52+
.SH OPTIONS
53+
.B goto\-cc
54+
understands the options of \fBgcc\fR(1) plus the following.
55+
.TP
56+
\fB\-\-verbosity\fR \fIN\fR
57+
Set verbosity level to \fIN\fR, which defaults to 1 (only errors are printed). A
58+
verbosity of 0 disables all output. Using a verbosity of 2 or greater, or using
59+
\fB\-Wall\fR enables warnings. Verbosity levels 4, 6, 8, 9, or 10 add increasing
60+
amounts of debug information.
61+
.TP
62+
\fB\-\-function\fR \fIname\fR
63+
Set entry point to \fIname\fR.
64+
.TP
65+
\fB\-\-native\-compiler\fR \fIcmd\fR
66+
Invoke \fIcmd\fR as preprocessor or compiler.
67+
.TP
68+
\fB\-\-native\-linker\fR \fIcmd\fR
69+
Invoke \fIcmd\fR as linker.
70+
.TP
71+
\fB\-\-native\-assembler\fR \fIcmd\fR
72+
Invoke \fIcmd\fR as assembler (\fBgoto\-as\fR only).
73+
.TP
74+
\fB\-\-export\-file\-local\-symbols\fR
75+
Name-mangle and export file-local (aka \fBstatic\fR) functions. Name mangling
76+
prefixes each symbol name by \fB__CPROVER_file_local\fR and the basename of the
77+
file. For example,
78+
.EX
79+
.IP
80+
// foo.c
81+
static int bar();
82+
.EE
83+
84+
yields a globally visible \fI__CPROVER_file_local_foo_c_bar\fR function.
85+
Note that this approach mangles all functions contained in a translation unit.
86+
We recommend using \fBcrangler\fR(1) as a more configurable alternative.
87+
.TP
88+
\fB\-\-mangle\-suffix \fIsuffix\fR
89+
Append \fIsuffix\fR to exported file-local symbols.
90+
.TP
91+
\fB\-\-print\-rejected\-preprocessed\-source\fR \fIfile\fR
92+
Copy failing (preprocessed) source to \fIfile\fR.
93+
.TP
94+
\fB\-\-object\-bits\fR \fIN\fR
95+
Configure the number of bits used for object numbering in CBMC's pointer encoding.
96+
.SH ENVIRONMENT
97+
All tools honor the TMPDIR environment variable when generating temporary
98+
files and directories.
99+
.B goto\-cc
100+
aims to accept all environment variables that \fBgcc\fR(1) does.
101+
.SH BUGS
102+
If you encounter a problem please create an issue at
103+
.B https://github.com/diffblue/cbmc/issues
104+
.SH SEE ALSO
105+
.BR as (1),
106+
.BR bcc (1),
107+
.BR cbmc (1),
108+
.BR crangler (1),
109+
.BR elf (5),
110+
.BR gcc (1),
111+
.BR ld (1)
112+
.SH COPYRIGHT
113+
2006\-2018, Daniel Kroening, Michael Tautschnig, Christoph Wintersteiger

doc/man/goto-gcc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cbmc.1
1+
goto-cc.1

doc/man/goto-ld.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cbmc.1
1+
goto-cc.1

src/goto-cc/goto_cc_mode.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ void goto_cc_modet::help()
6464
" --native-compiler cmd command to invoke as preprocessor/compiler\n"
6565
" --native-linker cmd command to invoke as linker\n"
6666
" --native-assembler cmd command to invoke as assembler (goto-as only)\n"
67+
" --export-file-local-symbols\n"
68+
" name-mangle and export file-local symbols\n"
69+
" --mangle-suffix suffix append suffix to exported file-local symbols\n"
6770
" --print-rejected-preprocessed-source file\n"
6871
" copy failing (preprocessed) source to file\n"
6972
" --object-bits number of bits used for object addresses\n"

0 commit comments

Comments
 (0)