delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-workers-bounces using -f |
Sender: | rich AT phekda DOT freeserve DOT co DOT uk |
Message-ID: | <3C0A0D35.B45C0E74@phekda.freeserve.co.uk> |
Date: | Sun, 02 Dec 2001 11:15:01 +0000 |
From: | Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> |
X-Mailer: | Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) |
X-Accept-Language: | de,fr |
MIME-Version: | 1.0 |
To: | djgpp-workers AT delorie DOT com |
Subject: | Re: Building a profiled version of libc |
References: | <10111252102 DOT AA19215 AT clio DOT rice DOT edu> |
Reply-To: | djgpp-workers AT delorie DOT com |
Hello. Charles Sandmann wrote: [snip] > > ./../../lib/libc.a(_write.o)(.text+0x0):_write.c: multiple definition > > of `_write' > > src/emudummy.o(.text+0x10):emudummy.c: first defined here > > make.exe: *** [../../bin/emu387.dxe] Error 1 [snip] > The original emu387.dxe builds only used _write for some debugging > messages you should never see unless there were bugs. If we are pulling > in the version of _write from the library it should only be if we are > referencing a different symbol in the same _write module somewhere else. Yes, that's exactly the problem. I needed to stub out _write_int() and _write_fill_seek_gap() too. Now I get the following errors: ./../../hostbin/dxegen.exe ./../../bin/emu387.dxe __emu_entry src/emu387.o id_em u.o src/emudummy.o -L../../lib c:/djgpp/lib/gcc-lib/djgpp/3.02/libgcc.a -lc c:/d jgpp/lib/gcc-lib/djgpp/3.02/libgcc.a ld -X -S -r -o dxe__tmp.o -L./../../lib src/emu387.o id_emu.o src/emudummy.o -L. ./../lib c:/djgpp/lib/gcc-lib/djgpp/3.02/libgcc.a -lc c:/djgpp/lib/gcc-lib/djgpp /3.02/libgcc.a -T dxe.ld Error: object contains unresolved external symbols (___exit) Error: object contains unresolved external symbols (djgpp_first_dtor) Error: multiple symbols that start with __emu_entry (__emu_entry)! Error: object contains unresolved external symbols (___djgpp_stack_limit) Error: object contains unresolved external symbols (djgpp_last_ctor) Error: object contains unresolved external symbols (djgpp_last_dtor) Error: object contains unresolved external symbols (djgpp_first_ctor) Error: object contains unresolved external symbols (__stklen) Error: object contains unresolved external symbols (___sbrk) Error: object contains unresolved external symbols (end) Error: object contains unresolved external symbols (etext) Error: object contains unresolved external symbols (___djgpp_base_address) Error: object contains unresolved external symbols (__crt0_init_mcount) Error: object contains unresolved external symbols (___djgpp_selector_limit) Error: object contains unresolved external symbols (start) Error: object contains unresolved external symbols (__stubinfo) Error: object contains unresolved external symbols (_main) make.exe: *** [../../bin/emu387.dxe] Error 17 Clearly using a profiling libc pulls in symbols that require a program's link environment. I don't think there is going to be a good way of fixing without building both normal and profile versions of the library and then linking against the normal library. I'll add a note to develop.txi about building profiling versions of libc. Are there any plans to build a package containing the profiling version of the library for 2.04 - a djpro204.zip containing libc_p.a, for instance? Has there been much demand for a profiling version of 2.03? (I'm guessing that there hasn't.) Thanks to everyone who helped, bye, Rich =] -- Richard Dawe http://www.phekda.freeserve.co.uk/richdawe/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |