public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tim Prince <TimothyPrince@sbcglobal.net>
To: William Tambe <tambewilliam@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Is there a way to build a program without stdlib linked to it?
Date: Wed, 14 May 2008 04:10:00 -0000	[thread overview]
Message-ID: <482A608B.9050409@sbcglobal.net> (raw)
In-Reply-To: <482A5397.30409@gmail.com>

William Tambe wrote:
> When I build a program ommiting:
> #include <stdio.h> or
> #include <stdlib.h>
>
> I get message such as:
> implicit declaration of built-in function 'printf' or 'malloc'
>
> Is there a way to build my program in a way that an error such as 
> symbol not found is generated instead of gcc linking agains stdlib?
>
You want to cause just those functions to go missing at link time?  On 
most platforms, you could strip functions out of the libraries which are 
linked automatically by gcc. It's outside the realm of gcc, unless those 
are builtins present in libgcc.

  parent reply	other threads:[~2008-05-14  3:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14  3:19 William Tambe
2008-05-14  3:46 ` me22
2008-05-14  4:10 ` Tim Prince [this message]
2008-05-14 12:58 ` Ian Lance Taylor

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=482A608B.9050409@sbcglobal.net \
    --to=timothyprince@sbcglobal.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=tambewilliam@gmail.com \
    --cc=tprince@computer.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).