How do linkers work?

H

Herbert Rosenau

You keep presenting this stuff as absolute, when it's not.
I had running a C compiler who was not even aware of something known
as binary. Its translation was nothing always generating source files
ready to use as input for the macro-assembler that produced some
output ready to use by the linker. Whereas the linker was only a
preprocessor for the loader. Whereas the loader was then only the
preperator for the starter.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!
 
H

Herbert Rosenau

to himself
You are just spreading MISINFORMATION.

The only job of a C compiler is to compile the language C into
something an implementation can use to get a final builded
executeabble onto the CPU.

The standard says nothing about linker, does not even mention how to
get a program in a state that it can be accessed by one or more
CPU(s). The standard does not even requires that there must be a
Compiler. C can be interpreted in runtime using an C interpreter. It
is possible to use a comiler that does nothing than compile C to a
bytecode to optimise the runtime the interpreter needs to interpret
that. So no linker is needed. No stavk is needed, no BSS is needed,
not even something that you names segments are needed.

C is a programming language that is defined by syntax, semantik and
behavior of an abstract mashine, whereas the behavior of the abstract
mashine itself is defined exactly, leaving open anything only a real
implementation can know.



--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!
 
J

jacob navia

Herbert said:
> The standard says nothing about linker, does not even mention how to
get a program in a state that it can be accessed by one or more
CPU(s). The standard does not even requires that there must be a
Compiler.

Wow. OK No linker, no compiler, no CPU.
C can be interpreted in runtime using an C interpreter. It
is possible to use a comiler that does nothing than compile C to a
bytecode to optimise the runtime the interpreter needs to interpret
that. So no linker is needed. No stavk is needed, no BSS is needed,
not even something that you names segments are needed.

Of course. If there is no CPU, I would be surprised
that a stack would exist

:)
C is a programming language that is defined by syntax, semantik and
behavior of an abstract mashine, whereas the behavior of the abstract
mashine itself is defined exactly, leaving open anything only a real
implementation can know.

Yeah.

Sure.

No CPU Herbert. No stack, no compiler, no linker.

No nothing. We are in the "regulars daydreams"...

Nothing exists all is illusion.
 
R

Richard Heathfield

jacob navia said:
Wow. OK No linker, no compiler, no CPU.

Right. C interpreters exist (which deals with your first two points). As
for the third, whilst a CPU is obviously a nice-to-have, it is certainly
possible to understand a C program without one, and to work out what it's
supposed to do. Yes, it's like crawling along the road on your hands and
knees instead of driving your nice shiny car, but it is still possible to
make progress. If this were *not* possible, we wouldn't really be able to
write C programs at all.
Of course. If there is no CPU, I would be surprised
that a stack would exist

I grew up in a house with no CPUs in it at all - but plenty of stacks. The
existence of stacks and the existence of CPUs are orthogonal to each
other. CPUs don't need stacks, and stacks don't need CPUs. You are just
hung up on a trivial implementation detail, that's all.
Yeah.

Sure.

He's right. Your sarcasm is misplaced.
No CPU Herbert. No stack, no compiler, no linker.

Those things exist, but the definition of C does not depend on them any
more than it depends on coffee, cheesecake, and ice cream (which also
exist, and which are just as vital to C programming). Thinking that the C
language can't exist without a compiler or linker is like thinking that
addition can't exist without a pocket calculator.
No nothing. We are in the "regulars daydreams"...

Nothing exists all is illusion.

That isn't what he's claiming.

There is a useful concept known as "abstraction". I suggest it would be a
really good idea for you to find out what it means, because it seems
you're one of only about four people around here who don't understand its
meaning and importance.
 
J

jacob navia

Richard said:
jacob navia said:


Right. C interpreters exist (which deals with your first two points). As
for the third, whilst a CPU is obviously a nice-to-have,

Ahhh thanks Mr Heathfield. OK If I understand you correctly
the car is $1699. Nice, quite cheap...
What?

The motor is optional?

Wow, I thought that it should be included... but
OK.

But it looks strange your car, not wheels. Ahh they are
optional "nice to haves"... OK; I understand.

:)
it is certainly
possible to understand a C program without one, and to work out what it's
supposed to do. Yes, it's like crawling along the road on your hands and
knees instead of driving your nice shiny car, but it is still possible to
make progress. If this were *not* possible, we wouldn't really be able to
write C programs at all.

Ahh, your car must be pushed around. Yes. I see, that's how I know
the road in detail and do not miss any stops, of course... Stupid
me.

I grew up in a house with no CPUs in it at all - but plenty of stacks. The
existence of stacks and the existence of CPUs are orthogonal to each
other. CPUs don't need stacks, and stacks don't need CPUs. You are just
hung up on a trivial implementation detail, that's all.

You know, pushing my car around I tend to concentrate on details
like this. I need more perspective of course, but it is difficult since
my head looks down all the time when pushing.
He's right. Your sarcasm is misplaced.


Those things exist, but the definition of C does not depend on them any
more than it depends on coffee,

WAIT!!!!

You can take anything, yes ANYTHING away. I accept you take away
the CPU, the stack, the linker, anything.

BUT THE COFFEE?????

NO!!!

"C" CAN'T EXIST WITHOUT COFFEE. That is A FACT OF LIFE Mr Heathfield.
Just go to ANY PROGRAMMER SHOP and you will see for yourself.

You can take away ANYTHING, only the coffee you can't!
> cheesecake, and ice cream (which also
> exist, and which are just as vital to C programming).
Obviously.

Thinking that the C
language can't exist without a compiler or linker is like thinking that
addition can't exist without a pocket calculator.

Yes, I know Mr Heathfield. Before we had cars we used to walk.
But that is not a reason to sell me a car without motor. I
will complain to the authorities.
That isn't what he's claiming.

There is a useful concept known as "abstraction". I suggest it would be a
really good idea for you to find out what it means, because it seems
you're one of only about four people around here who don't understand its
meaning and importance.

Maybe. I am always ready to learn something new. But I would suggest
that there is another thing you should know:

Abstraction can only grow from experiences with concrete things. It
is an error to think that abstraction comes before experience with
concrete stuff.

Only AFTER I have seen a lot of concrete things, I can abstract
their common characteristics. In my linker post I tried to abstract
from the working of several linkers into an abstract linker. The
same with object files, where I reduced all their differences to just
3 essential components.
 
R

Richard Heathfield

jacob navia said:
Ahhh thanks Mr Heathfield. OK If I understand you correctly

You don't understand me correctly.
OK; I understand.

No, you don't.
Stupid me.

Yes, so it seems. Sad, but true.
Yes, I know Mr Heathfield. Before we had cars we used to walk.

More to the point, we don't define addition in terms of a pocket
calculator, but as an abstract concept. Similarly, we don't define C in
terms of hardware, but as an abstract concept. This is the point that you
appear to be too stupid to grasp. Prove me wrong, please.
Maybe. I am always ready to learn something new. But I would suggest
that there is another thing you should know:

Abstraction can only grow from experiences with concrete things. It
is an error to think that abstraction comes before experience with
concrete stuff.

Only AFTER I have seen a lot of concrete things, I can abstract
their common characteristics.

Then please get on with it. This is something that most people manage to
learn during childhood. When you've caught up, let us know.
In my linker post I tried to abstract
from the working of several linkers into an abstract linker. The
same with object files, where I reduced all their differences to just
3 essential components.

Since the C language doesn't require implementations to produce object
files, you can reduce the number of essential components by three.
 
R

Richard

Herbert Rosenau said:
to himself


The only job of a C compiler is to compile the language C into
something an implementation can use to get a final builded
executeabble onto the CPU.

The standard says nothing about linker, does not even mention how to
get a program in a state that it can be accessed by one or more
CPU(s). The standard does not even requires that there must be a

Yes, but in the real world linkage plays a part in understanding how C
programs are assembled.
Compiler. C can be interpreted in runtime using an C interpreter. It
is possible to use a comiler that does nothing than compile C to a
bytecode to optimise the runtime the interpreter needs to interpret
that. So no linker is needed. No stavk is needed, no BSS is needed,
not even something that you names segments are needed.

C is a programming language that is defined by syntax, semantik and
behavior of an abstract mashine, whereas the behavior of the abstract
mashine itself is defined exactly, leaving open anything only a real
implementation can know.

No one really cares about the olden days - they are looking for help now
in the modern days using real compilers and built in linkers. They are
interested in how linkage between different languages might affect their
program. How debug information is stored etc.

Sorry, but thats the way it is. Try to be more helpful instead of
resentful. You will feel much happier.
 
L

lawrence.jones

jacob navia said:
"C" CAN'T EXIST WITHOUT COFFEE.

Of course it can. You just need Coke and Twinkies instead. :)

-Larry Jones

It seems like once people grow up, they have no idea what's cool. -- Calvin
 
H

Herbert Rosenau

nothing of substance like any twit does, proving again that his
knoledge base does contain nothing of substance relating to the
programming language known as C.

jacob navia <[email protected]> likes to prove that his brain is
shrinked to thing that there is nothing than windows and Ix86 iis
existing. So he proves himself constantly as twit.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!
 
H

Herbert Rosenau

Yes, but in the real world linkage plays a part in understanding how C
programs are assembled.

No, really not. How does linking cobol modules together helps to
understund how a C compiler works? How does knoledge of modula helps
to understund C? How does knoledge of how to build a building does
help to understund the simplest C program?

Linking has absolute nothing to do with programming in C.
No one really cares about the olden days - they are looking for help now
in the modern days using real compilers and built in linkers. They are
interested in how linkage between different languages might affect their
program. How debug information is stored etc.

Uh, what has linking to do with programming an embedded system that
has only running a single program?
Sorry, but thats the way it is. Try to be more helpful instead of
resentful. You will feel much happier.

Windows is nothing than a faulty idea of a buggy company that has
until today net even understund what C is. Anybody who reads only a
single artikle from you sees that you does not understund what the
standard is and how to use it.

Most of the real world uses C without the need of a linker, with no
need to relocate programs the C compiler ommits and even without the
need of something like an OS. And that on mashines without having an
BIOS, MMU, virtual addresses, but 3 different types of ROM, and a
limited amount of RAM.


--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2R Deutsch ist da!
 
A

Antoninus Twink

nothing of substance like any twit does, proving again that his
knoledge base does contain nothing of substance relating to the
programming language known as C.

jacob navia <[email protected]> likes to prove that his brain is
shrinked to thing that there is nothing than windows and Ix86 iis
existing. So he proves himself constantly as twit.

Another addition to the pool of clc'ers in need of psychiatric help...
 
K

Kenny McCormack

Another addition to the pool of clc'ers in need of psychiatric help...

It is scary, isn't it? I mean, they often ask why we post to the group
- and my response is "At least we're having fun!". You really have got
to wonder what's going on with some of these people...
 
J

jacob navia

Herbert said:
nothing of substance like any twit does, proving again that his
knoledge base does contain nothing of substance relating to the
programming language known as C.

jacob navia <[email protected]> likes to prove that his brain is
shrinked to thing that there is nothing than windows and Ix86 iis
existing. So he proves himself constantly as twit.

You said yesterday that C "doesn't need a CPU"...

I see now that for posting in usenet a brain is not necessary
either.
 
R

Richard Heathfield

jacob navia said:

[Herbert Rosenau] said yesterday that C "doesn't need a CPU"...

I see now that for posting in usenet a brain is not necessary
either.

Well, that has been clear for quite some time. Nevertheless, it is
certainly the case that it is possible to write, and indeed to read, C
programs without a CPU. C programs can be written, and read, on paper. To
demonstrate this, I invite you to turn to K&R2, page 8, where you will
find a short C program. I don't think you will have any difficulty in
following the program logic in your head - no CPU required.

Yes, *of course* a CPU is what brings a C program alive, and allows us to
do astounding things in vanishingly small amounts of time - but the
language nevertheless does have an existence that is independent of CPUs.
Were that not true, we would not be able to make any sense of other
people's C programs, let alone write our own.
 
J

jacob navia

Richard said:
jacob navia said:

[Herbert Rosenau] said yesterday that C "doesn't need a CPU"...

I see now that for posting in usenet a brain is not necessary
either.

Well, that has been clear for quite some time. Nevertheless, it is
certainly the case that it is possible to write, and indeed to read, C
programs without a CPU. C programs can be written, and read, on paper. To
demonstrate this, I invite you to turn to K&R2, page 8, where you will
find a short C program. I don't think you will have any difficulty in
following the program logic in your head - no CPU required.

Yes, *of course* a CPU is what brings a C program alive, and allows us to
do astounding things in vanishingly small amounts of time - but the
language nevertheless does have an existence that is independent of CPUs.
Were that not true, we would not be able to make any sense of other
people's C programs, let alone write our own.

So, this guy treats me like this:

<quote original Rosenau>
jacob navia likes to prove that his brain is
shrinked to thing that there is nothing than windows and Ix86 iis
existing. So he proves himself constantly as twit.
<end quote>

You, of course, do not use such a vocabulary. But you ignore all those
insults since (obviously) insulting me is fun and an allowed sport
for the members of your gang.

Then you pick up some technical point that has nothing to do with
the insults that guy sends in his hate filled message. For instance,
you start arguing the incredible new discovery:

"C programs can be read on paper".

Yes.

So, because "C programs can be read on paper" that guy can

< ... nothing of substance like any twit does,>
< ... So he proves himself constantly as twit.>

etc.

Mobbing
-------
Though the English word mob denotes a crowd, often in a destructive or
hostile mood, the German and several other European languages have
adopted mobbing as a loanword to describe all forms of bullying.

In street gangs, a bunch of cowards attacks *in a group* an individual
that the group feels as weak or isolated.

Your behavior here is that of a gang leader. You implicitly approve
the (verbal) violence of Mr Rosenau, by ignoring his insults, and
answering in a normal tone as he would have sent a normal mail
message.

This continuous stream of insults from your gang members is a well
documented fact (anyone can see them in google). You, of course,
as a gang leader, must cultivate an image of detachment and
concern with technical issues. This is better for the "image" of
your gang.

This has become increasingly evident in the lasts discussions here.

But you are doomed to failure heathfield. The basic premise of the
gang is that the attacked individual is isolated and weak.

Yours sincerely
 
R

Richard Heathfield

jacob navia said:

So, this guy treats me like this:

<quote original Rosenau>
jacob navia likes to prove that his brain is
shrinked to thing that there is nothing than windows and Ix86 iis
existing. So he proves himself constantly as twit.
<end quote>

You, of course, do not use such a vocabulary.

Right. But you do.
But you ignore all those
insults since (obviously) insulting me is fun and an allowed sport
for the members of your gang.

No, I ignored the insults in my reply to you because I was replying to you,
not to him. If you can't handle being insulted, don't be insulting. For
the record, since you bring it up, I don't agree with his claim.
Furthermore, despite the rantings of our resident trolls, I don't have a
"gang" here. TINC. Your reputation in this newsgroup is your doing, not
mine.
Then you pick up some technical point that has nothing to do with
the insults that guy sends in his hate filled message.

Absolutely. Wouldn't you rather hold a technical discussion than exchange
insults? Don't you think that's a better use of our time?
For instance,
you start arguing the incredible new discovery:

It's not incredible, it's not new, and it's not a discovery (except,
perhaps, to you).
"C programs can be read on paper".

Yes.

Right, so they don't need a CPU - which was the technical point under
discussion.
So, because "C programs can be read on paper" that guy can

< ... nothing of substance like any twit does,>
< ... So he proves himself constantly as twit.>

etc.

I don't know why you say "because" there. There is no causal connection.
You seemed to be in some doubt as to whether C programs can exist
independently of a CPU. The answer is that they can - and this knowledge
is actually fundamental to understanding the C language properly.

Your behavior here is that of a gang leader.

Oh, now you're just being silly. I take part in technical discussions, just
like you. I make mistakes, just like you. My mistakes are pointed out,
just as yours are. There are some major differences between us, though:
(1) when I make a mistake, I recognise and acknowledge it; (2) I respect
the conventions of the group on topicality and commercialism.

I don't lead a gang. I don't participate in a gang. If there *is* a gang
here, it's the troll crowd - and let's not forget that one of them once
threatened physical violence against me because he took exception to
having his C code corrected. *That* is bullying.
You implicitly approve
the (verbal) violence of Mr Rosenau, by ignoring his insults,

I ignore the vast majority of insults uttered in comp.lang.c (because if I
didn't, I'd never get anything done). That doesn't mean I approve of them.
Quite the contrary, in fact. If you truly believe that failure to condemn
an insult means that you approve of it, then presumably you approve of all
the insults hurled at me and at others here by the troll crowd? If so, is
it not rather hypocritical to complain when someone insults you?
and
answering in a normal tone as he would have sent a normal mail
message.

This continuous stream of insults from your gang members is a well
documented fact (anyone can see them in google).

Everybody is responsible for their own articles. The gang you mention is
just a figment of your imagination.
You, of course,
as a gang leader, must cultivate an image of detachment and
concern with technical issues.

I, as a non-gang non-leader, *am* concerned with technical issues. It isn't
an image I'm cultivating. It's the real thing.
This is better for the "image" of your gang.

What gang?
This has become increasingly evident in the lasts discussions here.

But you are doomed to failure heathfield. The basic premise of the
gang is that the attacked individual is isolated and weak.

Before a gang can have a premise, it must exist. It doesn't.
 
P

pete

Richard said:
jacob navia said:

What gang?

The gang with the power.

(What power?)
The power of voodoo

(Who do?)
You do, you do

(Do what?)
You lead a gang.

(What gang?)
The gang with the power.

(What power?)
The power of voodoo

(Who do?)
You do, you do

(Do what?)

We could take 'em out of this
Save us from the man with the hex.
Save us from his evil curse,
It's gonna get bad, it's gonna get worse.
 
B

Bartc

If I get this right: you write comprehensive C compilers; linkers;
debuggers; IDEs; add all sorts of advanced extensions; then repeat all this
on 64-bits; write manuals and tutorials; post articles on usenet; and it
sounds like you do all sorts of other stuff.

And you find time to reply at length to posts by Herbert Rosenau et al.

So, how on Earth do you find to time to sleep?

Many years ago I was sometimes taunted by people criticising my software,
and that upset me. Maybe I should have said to them, OK, show me /your/
product. And of course they had never written anything themselves.
 
A

Antoninus Twink

jacob navia said:

No, I ignored the insults in my reply to you because I was replying to you,
not to him. If you can't handle being insulted, don't be insulting. For
the record, since you bring it up, I don't agree with his claim.
Furthermore, despite the rantings of our resident trolls, I don't have a
"gang" here. TINC. Your reputation in this newsgroup is your doing, not
mine.

Yeah, right. There's no Clique presided over by you. Yeah, sure...
Absolutely. Wouldn't you rather hold a technical discussion than exchange
insults? Don't you think that's a better use of our time?

You said it.
Oh, now you're just being silly.

I don't lead a gang. I don't participate in a gang.

He's not being silly - he's just stating the blindingly obvious. You are
the leader of a gang of bullies.
If there *is* a gang
here, it's the troll crowd - and let's not forget that one of them once
threatened physical violence against me because he took exception to
having his C code corrected. *That* is bullying.

This same old chestnut every time - one crazy guy five years ago, and
Heathfield still goes on about it. Who exactly is the paranoid one with
the persecution complex?
Before a gang can have a premise, it must exist. It doesn't.

You can repeat that until you're blue in the face. The truth is plain
for all to see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top