delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/06/13:34:56

Message-Id: <200012061834.NAA08137@delorie.com>
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 6 Dec 2000 21:25:17 +0800
From: Xugang Zhang <zhxg AT 263 DOT net>
To: cygwin <cygwin AT sources DOT redhat DOT com>
Subject: what is the matter with gcc in cygwin?
Organization: OMNERC
X-mailer: FoxMail 3.0 beta 1 [cn]
Mime-Version: 1.0

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 AT 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019