[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/10199] New: 'nm' compiled for Linux -> Windows cross compi
From: |
sergstesh at yahoo dot com |
Subject: |
[Bug binutils/10199] New: 'nm' compiled for Linux -> Windows cross compilation silently ignores -S switch |
Date: |
26 May 2009 06:57:52 -0000 |
I have an environment for cross compilation and cross Linking for Windows under
Linux, the environment was built using
http://www.profv.de/mingw_cross_env/README.html ->
http://www.profv.de/mingw_cross_env/mingw_cross_env-2.5.tar.gz
.
It works good enough for me producing working Windows console executables.
The following session shows the problem reported in the summary - '-S' switche
is silently ignored by 'nm'; as 'objdump' shows, the .o files are practically
equivalent, so if '-S' works with Linux .o file, it should also work with
Windows one.
The session:
address@hidden:~/try_ltdl> cat -n f.c
1 unsigned lib_function(double input)
2 {
3 return (unsigned)input;
4 }
address@hidden:~/try_ltdl> gcc -c f.c -o f.lin.o
address@hidden:~/try_ltdl> ~/mingwi686/bin/i686-mingw32msvc-nm -S f.lin.o
00000000 00000033 T lib_function
address@hidden:~/try_ltdl> ~/mingwi686/bin/i686-mingw32msvc-gcc -c f.c -o
f.win.o
address@hidden:~/try_ltdl> ~/mingwi686/bin/i686-mingw32msvc-nm -S f.win.o
00000000 b .bss
00000000 d .data
00000000 t .text
00000000 T _lib_function
address@hidden:~/try_ltdl> ~/mingwi686/bin/i686-mingw32msvc-objdump -S f.lin.o
f.lin.o: file format elf32-i386
Disassembly of section .text:
00000000 <lib_function>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 18 sub $0x18,%esp
6: 8b 45 08 mov 0x8(%ebp),%eax
9: 89 45 f8 mov %eax,-0x8(%ebp)
c: 8b 45 0c mov 0xc(%ebp),%eax
f: 89 45 fc mov %eax,-0x4(%ebp)
12: dd 45 f8 fldl -0x8(%ebp)
15: d9 7d f6 fnstcw -0xa(%ebp)
18: 0f b7 45 f6 movzwl -0xa(%ebp),%eax
1c: b4 0c mov $0xc,%ah
1e: 66 89 45 f4 mov %ax,-0xc(%ebp)
22: d9 6d f4 fldcw -0xc(%ebp)
25: df 7d e8 fistpll -0x18(%ebp)
28: d9 6d f6 fldcw -0xa(%ebp)
2b: 8b 45 e8 mov -0x18(%ebp),%eax
2e: 8b 55 ec mov -0x14(%ebp),%edx
31: c9 leave
32: c3 ret
address@hidden:~/try_ltdl> ~/mingwi686/bin/i686-mingw32msvc-objdump -S f.win.o
f.win.o: file format pe-i386
Disassembly of section .text:
00000000 <_lib_function>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 18 sub $0x18,%esp
6: 8b 45 08 mov 0x8(%ebp),%eax
9: 89 45 f8 mov %eax,-0x8(%ebp)
c: 8b 45 0c mov 0xc(%ebp),%eax
f: 89 45 fc mov %eax,-0x4(%ebp)
12: dd 45 f8 fldl -0x8(%ebp)
15: d9 7d f6 fnstcw -0xa(%ebp)
18: 0f b7 45 f6 movzwl -0xa(%ebp),%eax
1c: b4 0c mov $0xc,%ah
1e: 66 89 45 f4 mov %ax,-0xc(%ebp)
22: d9 6d f4 fldcw -0xc(%ebp)
25: df 7d e8 fistpll -0x18(%ebp)
28: d9 6d f6 fldcw -0xa(%ebp)
2b: 8b 45 e8 mov -0x18(%ebp),%eax
2e: 8b 55 ec mov -0x14(%ebp),%edx
31: c9 leave
32: c3 ret
33: 90 nop
address@hidden:~/try_ltdl>
--
Summary: 'nm' compiled for Linux -> Windows cross compilation
silently ignores -S switch
Product: binutils
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: sergstesh at yahoo dot com
CC: bug-binutils at gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-mingw32msvc
http://sourceware.org/bugzilla/show_bug.cgi?id=10199
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/10199] New: 'nm' compiled for Linux -> Windows cross compilation silently ignores -S switch,
sergstesh at yahoo dot com <=