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: unassignedb...@nondot.org
          Reporter: ruppre...@google.com
                CC: alexander.v.shaposhni...@gmail.com,
                    jake.h.ehrl...@gmail.com,
                    jh7370.2...@my.bristol.ac.uk,
                    llvm-bugs@lists.llvm.org, ruppre...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to