This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
what is the matter with gcc in cygwin?
- To: cygwin <cygwin at sources dot redhat dot com>
- Subject: what is the matter with gcc in cygwin?
- From: Xugang Zhang <zhxg at 263 dot net>
- Date: Wed, 6 Dec 2000 21:25:17 +0800
- Organization: OMNERC
hello all !
why the gcc always says error?
my program is like this :
.text
.globl main
main:
pushl %eax
popl %eax
ret
a very simple one , the file name is t.s
the link script is this:
OUTPUT_FORMAT("ihex")
SECTIONS
{
. = 0x0;
.text : { *(.text) }
}
also a very simple on , the file name is t.cmd
when I use the command
gcc t.s -o t -T t.cmd
it said:
/usr/bin/ld: PE operatons on non PE file.
collect2: ld returned 1exit status
when I omit the line OUTPUT_FORMAT("ihex") in t.cmd
then use the command
gcc t.s -o t -T t.cmd
then it said:
/usr/lib/libcygwin.a(libcmain.o)(.text+0x6a):libcmain.c:undefined reference to 'WinMain@16'
/usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0xee):_cygwin_crt0_c:undefined
reference to '_data_start_'
/usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0xfa):_cygwin_crt0_c:undefined
reference to '_data_end_'
/usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0x101):_cygwin_crt0_c:undefined
reference to '_bss_start_'
/usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0x108):_cygwin_crt0_c:undefined
reference to '_data_end_'
/usr/bin/ld: bfd assertion fail /cygnus/netrel/src/binutils -20001029 -1/bfd/stabs.c : 600
collect2: ld returned 1 exit status
why the gcc always says error? the gcc version is 2.95.2-3
why the gcc ld always link with libcygwin.a ?I don't want it link with libcygwin.a.
thanks a lot!
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com