Skip to content

Commit f819525

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 26d87c4 commit f819525

File tree

4 files changed

+115
-3
lines changed

4 files changed

+115
-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: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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+
GOTO-CC can emulate different behaviors, which are controlled by the basename of
29+
the file that is used to invoke \fBgoto-cc\fR. This is typically accomplished by
30+
using symbolic links.
31+
.IP
32+
\fBgoto-gcc\fR: invokes \fBgcc\fR(1) as preprocessor and builds an \fBelf\fR(5)
33+
object file including an additional \fIgoto-cc\fR section that holds the goto
34+
binary.
35+
.IP
36+
\fBgoto-ld\fR: only performs linking, and also builds an \fBelf\fR(5) object as
37+
above.
38+
.IP
39+
\fBgoto-as\fR: invokes the system assembler \fBas\fR(1) and includes the
40+
original assembly source as a string in the output file.
41+
.IP
42+
\fBgoto-bcc\fR: invokes \fBbcc\fR(1) as preprocessor.
43+
.IP
44+
\fBgoto-armcc\fR: invokes \fBarmcc\fR as preprocessor and enables support for
45+
the ARM's C dialect and command-line options.
46+
.IP
47+
\fBgoto-cw\fR: invokes \fBmwcceppc\fR as preprocessor and enables support for
48+
CodeWarrior's C dialect and command-line options.
49+
.SH OPTIONS
50+
.B goto\-cc
51+
understands the options of \fBgcc\fR(1) plus the following.
52+
.TP
53+
\fB\-\-verbosity\fR \fIN\fR
54+
Set verbosity level to \fIN\fR, which defaults to 1 (only errors are printed). A
55+
verbosity of 0 disables all output. Using a verbosity of 2 or greater, or using
56+
\fB\-Wall\fR enables warnings. Verbosity levels 4, 6, 8, 9, or 10 add increasing
57+
amounts of debug information.
58+
.TP
59+
\fB\-\-function\fR \fIname\fR
60+
Set entry point to \fIname\fR.
61+
.TP
62+
\fB\-\-native\-compiler\fR \fIcmd\fR
63+
Invoke \fIcmd\fR as preprocessor or compiler.
64+
.TP
65+
\fB\-\-native\-linker\fR \fIcmd\fR
66+
Invoke \fIcmd\fR as linker.
67+
.TP
68+
\fB\-\-native\-assembler\fR \fIcmd\fR
69+
Invoke \fIcmd\fR as assembler (\fBgoto\-as\fR only).
70+
.TP
71+
\fB\-\-export\-file\-local\-symbols\fR
72+
Name-mangle and export file-local (aka \fBstatic\fR) functions. Name mangling
73+
prefixes each symbol name by \fB__CPROVER_file_local\fR and the basename of the
74+
file. For example,
75+
.EX
76+
.IP
77+
// foo.c
78+
static int bar();
79+
.EE
80+
81+
yields a globally visible \fI__CPROVER_file_local_foo_c_bar\fR function.
82+
Note that this approach mangles all functions contained in a translation unit.
83+
We recommend using \fBcrangler\fR(1) as a more configurable alternative.
84+
.TP
85+
\fB\-\-mangle\-suffix \fIsuffix\fR
86+
Append \fIsuffix\fR to exported file-local symbols.
87+
.TP
88+
\fB\-\-print\-rejected\-preprocessed\-source\fR \fIfile\fR
89+
Copy failing (preprocessed) source to \fIfile\fR.
90+
.TP
91+
\fB\-\-object\-bits\fR \fIN\fR
92+
Configure the number of bits used for object numbering in CBMC's pointer encoding.
93+
.SH ENVIRONMENT
94+
All tools honor the TMPDIR environment variable when generating temporary
95+
files and directories.
96+
.B goto\-cc
97+
aims to accept all environment variables that \fBgcc\fR(1) does.
98+
.SH BUGS
99+
If you encounter a problem please create an issue at
100+
.B https://github.com/diffblue/cbmc/issues
101+
.SH SEE ALSO
102+
.BR as (1),
103+
.BR bcc (1),
104+
.BR cbmc (1),
105+
.BR crangler (1),
106+
.BR elf (5),
107+
.BR gcc (1),
108+
.BR ld (1)
109+
.SH COPYRIGHT
110+
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)