Skip to content

Commit e758237

Browse files
authored
[docs] Mention --discard-locals/--discard-all change for llvm-strip
PR #130704 updated llvm-strip as well. Suggested by @nga888 Pull Request: #131491
1 parent 3c4b931 commit e758237

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

llvm/docs/CommandGuide/llvm-strip.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ multiple file formats.
3737

3838
.. option:: --discard-all, -x
3939

40-
Remove most local symbols from the output. Different file formats may limit
41-
this to a subset of the local symbols. For example, file and section symbols in
42-
ELF objects will not be discarded. Additionally, remove all debug sections.
40+
Remove most local symbols not referenced by relocations from the output.
41+
Different file formats may limit this to a subset of the local symbols. For
42+
example, file and section symbols in ELF objects will not be discarded.
43+
Additionally, remove all debug sections.
4344

4445
.. option:: --enable-deterministic-archives, -D
4546

@@ -152,7 +153,7 @@ them.
152153

153154
.. option:: --discard-locals, -X
154155

155-
Remove local symbols starting with ".L" from the output.
156+
Remove local symbols starting with ".L" not referenced by relocations from the output.
156157

157158
.. option:: --keep-file-symbols
158159

llvm/docs/ReleaseNotes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ Changes to the LLVM tools
169169

170170
* llvm-objcopy now supports the `--update-section` flag for intermediate Mach-O object files.
171171
* llvm-strip now supports continuing to process files on encountering an error.
172-
* In llvm-objcopy's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
172+
* In llvm-objcopy/llvm-strip's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
173+
([#47468](https://github.com/llvm/llvm-project/issues/47468))
173174

174175
Changes to LLDB
175176
---------------------------------

0 commit comments

Comments
 (0)