[llvm-bugs] [Bug 42171] New: Default --output-target to --input-target when unspecified

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 6 11:55:29 PDT 2019


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

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190606/bdd2cf32/attachment.html>


More information about the llvm-bugs mailing list