On Wed, Mar 4, 2009 at 12:43 AM, Anthony Sorace wrote:
> i could see this going either way, but from my perspective the linker
> did what you told it.
The linker has NOT done what it is supposed to do. From the man page:
> These commands load the named files into executable files
> for the corr
viewing the source code, i suspect it's an oversight rather than essential
design.
> "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 doe
I consider that a feature, specially when starting something new
I just touch the files I think I will need and put them in the mkfile
it just works!
On Tue, Mar 3, 2009 at 5:03 PM, Enrique Soriano wrote:
> term% cd /tmp
> term% ls nothing.c
> ls: nothing.c: 'nothing.c' file does not exist
> ter
"Unix never says 'please'"
Nor is it supposed to keep users from doing stupid things... thank
God, or I could not use it.
uriel
On Wed, Mar 4, 2009 at 12:45 AM, andrey mirtchovski
wrote:
>> Or perhaps, since the user went to trouble of making sure the file
>> didn't exist and then creating the
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; 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
> Or perhaps, since the user went to trouble of making sure the file
> didn't exist and then creating the empty file, the compiler and linker
> felt it would be rude if they didn't do something with it?
you can call Plan 9 whatever you'd like, but don't call it "impolite" :)
i could see this going either way, but from my perspective the linker
did what you told it. it didn't see anything it couldn't recognize,
and didn't find any symbols it wasn't able to resolve. it's a weird
case, certainly, but it doesn't strike me as wrong.
if i were inclined to submit a patch, it
On Tue, Mar 3, 2009 at 6:37 PM, andrey mirtchovski
wrote:
>> Does it have any sense to create a 0 byte executable file?
>> Success or failure? Can you execute it?
>
> "Garbage-in, Garbage-out"
Or perhaps, since the user went to trouble of making sure the file
didn't exist and then creating the em
> Does it have any sense to create a 0 byte executable file?
> Success or failure? Can you execute it?
"Garbage-in, Garbage-out"
On Mar 3, 2009, at 11:54 PM, andrey mirtchovski wrote:
if nobody replies to your email, would you report an error?
or, if you prefer:
if a linker has nothing to link (in the forest), should everybody
hear about it?
:)
Commands are expected to be loud on errors and silent
on success.
Do
if nobody replies to your email, would you report an error?
or, if you prefer:
if a linker has nothing to link (in the forest), should everybody hear about it?
:)
term% cd /tmp
term% ls nothing.c
ls: nothing.c: 'nothing.c' file does not exist
term% touch nothing.c
term% 8c -FVw nothing.c
term% 8l -o nothing nothing.8
term% echo $status
term% ls -l nothing
--rwxrwxr-x M 8 glenda glenda 0 Mar 3 21:49 nothing
term% ./nothing
./nothing: exec header invalid
13 matches
Mail list logo