delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/28/20:32:14

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <410-220021022913152579@M2W033.mail2web.com>
X-Priority: 3
Reply-To: lhall AT rfk DOT com
X-Originating-IP: 209.113.174.244
From: "lhall AT pop DOT ma DOT ultranet DOT com" <lhall AT pop DOT ma DOT ultranet DOT com>
To: yzhang AT hum DOT capsl DOT udel DOT edu, cygwin AT cygwin DOT com
Subject: RE: Cannot export etext or undefined reference to `WinMain AT 16'
Date: Mon, 28 Oct 2002 20:31:52 -0500
MIME-Version: 1.0
X-OriginalArrivalTime: 29 Oct 2002 01:31:52.0544 (UTC) FILETIME=[F576B600:01C27EEA]
Note-from-DJ: This may be spam
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g9T1WEm10560

See the FAQ entry:

Why the undefined reference to `WinMain AT 16'?
http://cygwin.com/faq/faq_4.html#SEC92

Larry

Original Message:
-----------------
From: Yingping Zhang yzhang AT hum DOT capsl DOT udel DOT edu
Date: Mon, 28 Oct 2002 19:18:41 -0500 (EST)
To: cygwin AT cygwin DOT com
Subject: "Cannot export etext" or undefined reference to `WinMain AT 16'



Hello all,

When I tried to port a compiler, which is ported from Pro64, from Linux to
Cygwin, I encountered some stinking problems. Please help me to beat them.

At first, when I got all *.o files and tried to build be.so, I got a error
report:

Cannot export etext: symbol not found
collect2: ld returned 1 exit status

I used such options:
-----------------------------------------------------------------------

g++-2 -D_SGI_SOURCE -D_LANGUAGE_C_PLUS_PLUS -Wformat -funsigned-char
-D__GNU_BUG_WORKAROUND -D_NOTHREADS  -D_LEGO_CLONER -DBACK_END -Dlonglong
-DSTD_MONGOOSE_LOC='"/usr/lib32/cmplrs"' -DMONGOOSE_BE -D_LONGLONG
-D_SVR4_SOURCE -D_NEW_SYMTAB -D__MIPS_AND_IA64_ELF_H -I../../be/com
-I../../be/com/arm -I../../be/region ......(omit) -DTARG_ARM
-fwritable-strings  -I../include -O0 -D_MIPSEL -D_LONGLONG
-D_MIPS_SZINT=32 -D_MIPS_SZPTR=32 -D_MIPS_SZLONG=32 -MD  -elf -shared
-o be.so ti_init.o ti_res.o ti_rese.o ......(omit)  config_targ.o
config_elf_targ.o targ_const.o targ_sim.o instr_reader.o  \
        ../targ_info/libtarginfo.a arm.so \
        -o be.so -ldl -lm

-------------------------------------------------------------------------
Next, If I removed the option -shared from above, then the "Cannot export
etext" would not be reported any more, but it will report a new error:

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-10/../../../../i686-pc-cygwin/bin/ld:
warning: cannot find entry symbol lf; defaulting to 00401000
/usr/lib/libcygwin.a(libcmain.o)(.text+0x7c): undefined reference to
`WinMain AT 16'

Anyone has suggestions?
Thanks in advance.

Yvonne




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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