1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
|
.\" Man page generated from reStructuredText.
.
.TH "LLVM-STRIP" "1" "2021-09-18" "13" "LLVM"
.SH NAME
llvm-strip \- object stripping tool
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBllvm\-strip\fP [\fIoptions\fP] \fIinputs…\fP
.SH DESCRIPTION
.sp
\fBllvm\-strip\fP is a tool to strip sections and symbols from object files.
If no other stripping or remove options are specified, \fI\%\-\-strip\-all\fP
will be enabled.
.sp
By default, the input files are modified in\-place. If “\-” is specified for the
input file, the input is read from the program’s standard input stream.
.sp
If the input is an archive, any requested operations will be applied to each
archive member individually.
.sp
The tool is still in active development, but in most scenarios it works as a
drop\-in replacement for GNU’s \fBstrip\fP\&.
.SH GENERIC AND CROSS-PLATFORM OPTIONS
.sp
The following options are either agnostic of the file format, or apply to
multiple file formats.
.INDENT 0.0
.TP
.B \-\-disable\-deterministic\-archives, \-U
Use real values for UIDs, GIDs and timestamps when updating archive member
headers.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-discard\-all, \-x
Remove most local symbols from the output. Different file formats may limit
this to a subset of the local symbols. For example, file and section symbols in
ELF objects will not be discarded. Additionally, remove all debug sections.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-enable\-deterministic\-archives, \-D
Enable deterministic mode when stripping archives, i.e. use 0 for archive member
header UIDs, GIDs and timestamp fields. On by default.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help, \-h
Print a summary of command line options.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-no\-strip\-all
Disable \fI\%\-\-strip\-all\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-o <file>
Write output to <file>. Multiple input files cannot be used in combination
with \-o.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-regex
If specified, symbol and section names specified by other switches are treated
as extended POSIX regular expression patterns.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-remove\-section <section>, \-R
Remove the specified section from the output. Can be specified multiple times
to remove multiple sections simultaneously.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-all\-gnu
Remove all symbols, debug sections and relocations from the output. This option
is equivalent to GNU \fBstrip\fP’s \fB\-\-strip\-all\fP switch.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-all, \-s
For ELF objects, remove from the output all symbols and non\-alloc sections not
within segments, except for .gnu.warning, .ARM.attribute sections and the
section name table.
.sp
For COFF objects, remove all symbols, debug sections, and relocations from the
output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-debug, \-d, \-g, \-S
Remove all debug sections from the output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-symbol <symbol>, \-N
Remove all symbols named \fB<symbol>\fP from the output. Can be specified
multiple times to remove multiple symbols.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-unneeded
Remove from the output all local or undefined symbols that are not required by
relocations. Also remove all debug sections.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version, \-V
Display the version of the \fBllvm\-strip\fP executable.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-wildcard, \-w
Allow wildcard syntax for symbol\-related flags. On by default for
section\-related flags. Incompatible with –regex.
.sp
Wildcard syntax allows the following special symbols:
.TS
center;
|l|l|l|.
_
T{
Character
T} T{
Meaning
T} T{
Equivalent
T}
_
T{
\fB*\fP
T} T{
Any number of characters
T} T{
\fB\&.*\fP
T}
_
T{
\fB?\fP
T} T{
Any single character
T} T{
\fB\&.\fP
T}
_
T{
\fB\e\fP
T} T{
Escape the next character
T} T{
\fB\e\fP
T}
_
T{
\fB[a\-z]\fP
T} T{
Character class
T} T{
\fB[a\-z]\fP
T}
_
T{
\fB[!a\-z]\fP, \fB[^a\-z]\fP
T} T{
Negated character class
T} T{
\fB[^a\-z]\fP
T}
_
.TE
.sp
Additionally, starting a wildcard with ‘!’ will prevent a match, even if
another flag matches. For example \fB\-w \-N \(aq*\(aq \-N \(aq!x\(aq\fP will strip all symbols
except for \fBx\fP\&.
.sp
The order of wildcards does not matter. For example, \fB\-w \-N \(aq*\(aq \-N \(aq!x\(aq\fP is
the same as \fB\-w \-N \(aq!x\(aq \-N \(aq*\(aq\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B @<FILE>
Read command\-line options and commands from response file \fI<FILE>\fP\&.
.UNINDENT
.SH COFF-SPECIFIC OPTIONS
.sp
The following options are implemented only for COFF objects. If used with other
objects, \fBllvm\-strip\fP will either emit an error or silently ignore
them.
.INDENT 0.0
.TP
.B \-\-only\-keep\-debug
Remove the contents of non\-debug sections from the output, but keep the section
headers.
.UNINDENT
.SH ELF-SPECIFIC OPTIONS
.sp
The following options are implemented only for ELF objects. If used with other
objects, \fBllvm\-strip\fP will either emit an error or silently ignore
them.
.INDENT 0.0
.TP
.B \-\-allow\-broken\-links
Allow \fBllvm\-strip\fP to remove sections even if it would leave invalid
section references. Any invalid sh_link fields will be set to zero.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-discard\-locals, \-X
Remove local symbols starting with “.L” from the output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-keep\-file\-symbols
Keep symbols of type \fISTT_FILE\fP, even if they would otherwise be stripped.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-keep\-section <section>
When removing sections from the output, do not remove sections named
\fB<section>\fP\&. Can be specified multiple times to keep multiple sections.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-keep\-symbol <symbol>, \-K
When removing symbols from the output, do not remove symbols named
\fB<symbol>\fP\&. Can be specified multiple times to keep multiple symbols.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-preserve\-dates, \-p
Preserve access and modification timestamps in the output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-strip\-sections
Remove from the output all section headers and all section data not within
segments. Note that many tools will not be able to use an object without
section headers.
.UNINDENT
.INDENT 0.0
.TP
.B \-T
Remove Swift symbols.
.UNINDENT
.SH EXIT STATUS
.sp
\fBllvm\-strip\fP exits with a non\-zero exit code if there is an error.
Otherwise, it exits with code 0.
.SH BUGS
.sp
To report bugs, please visit <\fI\%https://bugs.llvm.org/\fP>.
.SH SEE ALSO
.sp
\fBllvm\-objcopy(1)\fP
.SH AUTHOR
Maintained by the LLVM Team (https://llvm.org/).
.SH COPYRIGHT
2003-2021, LLVM Project
.\" Generated by docutils manpage writer.
.
|