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

            Bug ID: 42171
           Summary: Default --output-target to --input-target when
                    unspecified
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-objcopy/strip
          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

When -O|--output-format is unspecified, GNU objcopy defaults to whatever
-I|--input-target is (even if that is also unspecified). llvm-objcopy doesn't
do this, but instead converts it to ELF:

$ echo abc > /tmp/foo.txt

$ objcopy -I binary -Bi386 /tmp/foo.txt /tmp/bar.txt
$ file /tmp/bar.txt
/tmp/bar.txt: ASCII text

$ llvm-objcopy -I binary -Bi386 /tmp/foo.txt /tmp/bar.txt
$ file /tmp/bar.txt
/tmp/bar.txt: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not
stripped

-- 
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