[all-commits] [llvm/llvm-project] 7a66a2: [llvm-objcopy, ELF] --discard-locals/--discard-all:...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Mar 11 21:26:34 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a66a26658f40d00ad4c298260d9c3b8f91e1368
https://github.com/llvm/llvm-project/commit/7a66a26658f40d00ad4c298260d9c3b8f91e1368
Author: Fangrui Song <i at maskray.me>
Date: 2025-03-11 (Tue, 11 Mar 2025)
Changed paths:
M llvm/docs/CommandGuide/llvm-objcopy.rst
M llvm/docs/ReleaseNotes.md
M llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
M llvm/test/tools/llvm-objcopy/ELF/discard-all.test
R llvm/test/tools/llvm-objcopy/ELF/discard-locals-rel.test
M llvm/test/tools/llvm-objcopy/ELF/discard-locals.test
Log Message:
-----------
[llvm-objcopy,ELF] --discard-locals/--discard-all: allow and keep symbols referenced by relocations
In GNU objcopy, symbols referenced by relocations are retained. Our COFF
(https://reviews.llvm.org/D56480) and Mach-O
(https://reviews.llvm.org/D75104) ports port the behavior, but the ELF
port doesn't.
This PR implements the behavior for ELF.
Close #47468 (tcl has a use case that requires `strip -x tclStubLib.o`
to strip local symbols not referenced by relocations.)
Pull Request: https://github.com/llvm/llvm-project/pull/130704
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list