delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/28/19:22:15

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
Date: Mon, 28 Oct 2002 19:18:41 -0500 (EST)
From: Yingping Zhang <yzhang AT hum DOT capsl DOT udel DOT edu>
To: <cygwin AT cygwin DOT com>
Subject: "Cannot export etext" or undefined reference to `WinMain AT 16'
Message-ID: <Pine.GSO.4.33.0210281914570.12342-100000@hum.capsl.udel.edu>
MIME-Version: 1.0

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/

- Raw text -


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