From: Enrique Soriano <esoriano@lsub.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 8c, 8l, and empty files
Date: Wed, 4 Mar 2009 12:56:17 +0100 [thread overview]
Message-ID: <3229c0130903040356u315db58ej3bc30e24b434d425@mail.gmail.com> (raw)
In-Reply-To: <14ec7b180903031552s31ac6f7bn538bedbd960c342e@mail.gmail.com>
> "Garbage-in, Garbage-out"
What does it happen when you
try to link an object file that
does not have main() defined?
And when you try to link a malformed
object file?
In these cases, there is not any
garbage-out for the garbage-in.
There is an error, as expected.
> two things: the linker doesn't only produce binaries, it has options
> for producing other output in which a null object file may be
> applicable;
In most cases it is used to create a
binary.
> furthermore, it takes more than a single file, so you can
> see how a #ifdef-ed C file compiles to nothing (even if it's bad
> practice) but then is linked with other parts of the program just
> fine.
In the example, I was linking a *unique*
empty object file.
To create a 0 byte exec file,
that is, a binary without
a header, is a nonsense.
Regards,
Q.
next prev parent reply other threads:[~2009-03-04 11:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 20:03 Enrique Soriano
2009-03-03 22:54 ` andrey mirtchovski
2009-03-03 23:29 ` Enrique Soriano
2009-03-03 23:37 ` andrey mirtchovski
2009-03-03 23:41 ` J.R. Mauro
2009-03-03 23:45 ` andrey mirtchovski
2009-03-03 23:57 ` Uriel
2009-03-03 23:43 ` Anthony Sorace
2009-03-03 23:52 ` andrey mirtchovski
2009-03-04 11:56 ` Enrique Soriano [this message]
2009-03-04 15:54 ` Juan Céspedes
2009-03-04 12:25 ` Charles Forsyth
2009-03-04 2:16 ` Federico G. Benavento
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=3229c0130903040356u315db58ej3bc30e24b434d425@mail.gmail.com \
--to=esoriano@lsub.org \
--cc=9fans@9fans.net \
/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 NNTP newsgroup(s).