[llvm-bugs] [Bug 41077] New: Implement --only-keep-debug for ELF

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 14 14:12:47 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41077

            Bug ID: 41077
           Summary: Implement --only-keep-debug for ELF
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-objcopy
          Assignee: unassignedbugs at nondot.org
          Reporter: rupprecht at google.com
                CC: alexander.v.shaposhnikov at gmail.com,
                    jake.h.ehrlich at gmail.com,
                    jh7370.2008 at my.bristol.ac.uk,
                    llvm-bugs at lists.llvm.org, rupprecht at google.com

llvm-objcopy accepts the --only-keep-debug flag, but ignores it for ELF. (COFF
implements it here:
https://github.com/llvm/llvm-project/blob/master/llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp#L112)

This supports a common workflow, e.g. as suggested by GNU man pages for
objcopy:

1. clang <...> -o foo
2. llvm-objcopy --only-keep-debug foo foo.dbg
3. llvm-objcopy --strip-debug foo
4. llvm-objcopy --add-gnu-debuglink=foo.dbg foo

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190314/ddfe1576/attachment.html>


More information about the llvm-bugs mailing list