Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F95829348
D32061.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
8 KB
Referenced Files
None
Subscribers
None
D32061.diff
View Options
diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-objcopy/Makefile
--- a/usr.bin/clang/llvm-objcopy/Makefile
+++ b/usr.bin/clang/llvm-objcopy/Makefile
@@ -3,6 +3,7 @@
.include <src.opts.mk>
PROG_CXX= llvm-objcopy
+MAN= llvm-objcopy.1 llvm-strip.1
SRCDIR= llvm/tools/llvm-objcopy
SRCS+= COFF/COFFObjcopy.cpp
@@ -47,7 +48,8 @@
.if ${MK_LLVM_BINUTILS} != "no"
LINKS+= ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \
${BINDIR}/llvm-strip ${BINDIR}/strip
-MLINKS= llvm-objcopy.1 objcopy.1
+MLINKS= llvm-objcopy.1 objcopy.1 \
+ llvm-strip.1 strip.1
.endif
.include "../llvm.prog.mk"
diff --git a/usr.bin/clang/llvm-objcopy/llvm-strip.1 b/usr.bin/clang/llvm-objcopy/llvm-strip.1
new file mode 100644
--- /dev/null
+++ b/usr.bin/clang/llvm-objcopy/llvm-strip.1
@@ -0,0 +1,288 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.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
+..
+.TH "LLVM-STRIP" "1" "2021-12-22" "13" "LLVM"
+.SH NAME
+llvm-strip \- object stripping tool
+.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\(aqs 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\(aqs \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\(aqs \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 \(aq!\(aq 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.
+.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 23, 7:22 PM (22 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12553614
Default Alt Text
D32061.diff (8 KB)
Attached To
Mode
D32061: llvm-strip: Add manpage
Attached
Detach File
Event Timeline
Log In to Comment