Thu 22 Aug 2013 03:01:11 PM UTC, comment #5:
I can explain why sh.exe makes the difference. GNU Make on Windows always prefers a Unixy shell if it can find it. If it cannot find it, it uses cmd.exe.
Also, Make does not invoke the shell if there are no shell features, such as quoting and redirection, on the command line it needs to invoke. That is why objdump worked correctly for you without redirection, even when sh.exe was on PATH.
The conclusion is that your sh.exe did something wrong with redirection, I don't know why. (In general, the number of non-buggy ports of Unixy shells to Windows is very small.)
|
Wed 21 Aug 2013 03:17:35 PM UTC, comment #3:
Yes, it's clear now, thanks.
However, I cannot reproduce this problem on my machine, neither with Make 3.80 nor with 3.81. Redirection or not, objdump works fine for me here.
Is the problem specific to objdump, or does any program fail when redirection is in use?
Do you have a sh.exe somewhere on your PATH? If so, perhaps remove it from PATH or rename it, and try again.
|
Wed 21 Aug 2013 07:42:09 AM UTC, comment #2:
If I use objdump inside makefile, arguments are passed incorrectly so objdump thinks that there is no parameter. That is why USAGE is shown.
If I use objdump just from the command line, everything is OK - ELF is not found but that does not matter now.
If I use objdump inside makefile WITHOUT redirection, it works correctly.
So, from my point of view, redirection with '>' does not work correctly in GNU Make.
Hopefully now it is more clear.
|
Tue 20 Aug 2013 01:37:12 PM UTC, original submission:
Redirection is badly interpreted on MS Windows in version 3.81 and older (I tried 3.80, too). If I do not use redirection, objdump works correctly from Makefile
D:\>make -version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-mingw32
D:\>make
arm-none-eabi-objdump -S kvak.elf > kvak.lst
Usage: d:\optm\yagarto\bin\arm-none-eabi-objdump.exe <option(s)> <file(s)>
Display information from object <file(s)>.
At least one of the following switches must be given:
-a, --archive-headers Display archive header information
-f, --file-headers Display the contents of the overall file header
-p, --private-headers Display object format specific file header contents
-h, --[section-]headers Display the contents of the section headers
-x, --all-headers Display the contents of all headers
-d, --disassemble Display assembler contents of executable sections
-D, --disassemble-all Display assembler contents of all sections
-S, --source Intermix source code with disassembly
-s, --full-contents Display the full contents of all sections requested
-g, --debugging Display debug information in object file
-e, --debugging-tags Display debug information using ctags style
-G, --stabs Display (in raw form) any STABS info in the file
-W[lLiaprmfFsoRt] or
--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,
=frames-interp,=str,=loc,=Ranges,=pubtypes,
=trace_info,=trace_abbrev,=trace_aranges]
Display DWARF info in the file
-t, --syms Display the contents of the symbol table(s)
-T, --dynamic-syms Display the contents of the dynamic symbol table
-r, --reloc Display the relocation entries in the file
-R, --dynamic-reloc Display the dynamic relocation entries in the file
@<file> Read options from <file>
-v, --version Display this program's version number
-i, --info List object formats and architectures supported
-H, --help Display this information
make: *** [uIPTest.bin] Error 2
D:\>arm-none-eabi-objdump -S kvak.elf > kvak.lst
arm-none-eabi-objdump: 'kvak.elf': No such file
|