Skip to content

[docs] Mention --discard-locals/--discard-all change for llvm-strip #131491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

MaskRay
Copy link
Member

@MaskRay MaskRay commented Mar 16, 2025

PR #130704 updated llvm-strip as well.

Suggested by @nga888

Created using spr 1.3.5-bogner
@llvmbot
Copy link
Member

llvmbot commented Mar 16, 2025

@llvm/pr-subscribers-llvm-binary-utilities

Author: Fangrui Song (MaskRay)

Changes

PR #130704 updated llvm-strip as well.

Suggested by @nga888


Full diff: https://github.com/llvm/llvm-project/pull/131491.diff

2 Files Affected:

  • (modified) llvm/docs/CommandGuide/llvm-strip.rst (+5-4)
  • (modified) llvm/docs/ReleaseNotes.md (+2-1)
diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst
index b0777991eb901..b4d6dc08dc1ac 100644
--- a/llvm/docs/CommandGuide/llvm-strip.rst
+++ b/llvm/docs/CommandGuide/llvm-strip.rst
@@ -37,9 +37,10 @@ multiple file formats.
 
 .. option:: --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.
+ Remove most local symbols not referenced by relocations 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.
 
 .. option::  --enable-deterministic-archives, -D
 
@@ -152,7 +153,7 @@ them.
 
 .. option:: --discard-locals, -X
 
- Remove local symbols starting with ".L" from the output.
+ Remove local symbols starting with ".L" not referenced by relocations from the output.
 
 .. option:: --keep-file-symbols
 
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index eb050e2747bc5..880df342447ae 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -165,7 +165,8 @@ Changes to the LLVM tools
 
 * llvm-objcopy now supports the `--update-section` flag for intermediate Mach-O object files.
 * llvm-strip now supports continuing to process files on encountering an error.
-* In llvm-objcopy's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
+* In llvm-objcopy/llvm-strip's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
+  (`#47468 <https://github.com/llvm/llvm-project/issues/47468>`_).
 
 Changes to LLDB
 ---------------------------------

Copy link
Collaborator

@nga888 nga888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the 1 query about the release notes.

@@ -165,7 +165,8 @@ Changes to the LLVM tools

* llvm-objcopy now supports the `--update-section` flag for intermediate Mach-O object files.
* llvm-strip now supports continuing to process files on encountering an error.
* In llvm-objcopy's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
* In llvm-objcopy/llvm-strip's ELF port, `--discard-locals` and `--discard-all` now allow and preserve symbols referenced by relocations.
(`#47468 <https://github.com/llvm/llvm-project/issues/47468>`_).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure of the syntax but do you mean:

([#47468](https://github.com/llvm/llvm-project/issues/47468))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this! I thought I was writing reST..

.
Created using spr 1.3.5-bogner
@MaskRay MaskRay merged commit e758237 into main Mar 18, 2025
7 of 11 checks passed
@MaskRay MaskRay deleted the users/MaskRay/spr/docs-mention-discard-locals-discard-all-change-for-llvm-strip branch March 18, 2025 03:09
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Mar 18, 2025
…lvm-strip

PR #130704 updated llvm-strip as well.

Suggested by @nga888

Pull Request: llvm/llvm-project#131491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants