public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Benjamin Scherrey <scherrey@innoverse.com>
To: gcc@gcc.gnu.org
Subject: What's bringing these symbols in???
Date: Sun, 16 Sep 2001 19:34:00 -0000	[thread overview]
Message-ID: <01091622320900.00690@incognito.innoverse.com> (raw)

When doing:
gcc -Wl,-Bstatic -o wipedrive Display.o Eraser.o FileDevice.o Progress.o 
Selection.o /usr/lib/libncurses.a /usr/local/lib/libcdk.a

I get these linker errors:

Eraser.o: In function 
'__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned int)':
Eraser.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned 
int)+0x22): undefined reference to 'cerr'
Eraser.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned 
int)+0x22): undefined reference to 'ostream::operator<<(char const *)'
Eraser.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned 
int)+0x22): undefined reference to 'endl(ostream &)'

I'm writing a utility that will exist in very limited disk space (a boot 
floppy) and cannot afford to link in libstdc++. No where do I use iostreams 
in my application. I do use new & delete as well as a vector.

What is causing the reference to these symbols? How can I kill these linker 
requirements? Is there any way I can force the linkage with the symbols 
missing? My program will never get to these symbols unless it crashes so 
frankly I don't care if they're faked. This is driving me nuts! My program is 
700K when i include libstdc++ which is completely insane. It needs to be 
under 400K.

I'm running under gcc-2.95.2.1 with Intel Linux 2.2.19.

	thanx & later,

		Ben Scherrey

             reply	other threads:[~2001-09-16 19:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-16 19:34 Benjamin Scherrey [this message]
2001-09-17 11:23 Benjamin Kosnik
2001-09-17 15:27 mike stump

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01091622320900.00690@incognito.innoverse.com \
    --to=scherrey@innoverse.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).