LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Can't compile OS example (https://www.linuxquestions.org/questions/programming-9/cant-compile-os-example-803561/)

MTK358 04-22-2010 04:41 PM

It means that --architecture is not what I want.

Thanks for spending so much time clearing such an obvious thing up.

XavierP 04-22-2010 05:17 PM

Sergei - if you can see where MTK is going wrong, it would be far more useful if you would show him what he needs to do rather than berate him for not understanding what he is seeing. He seems to be trying to learn this himself so does not have the luxury of asking anyone outside LQ.

If you think that your method is the best for teaching, it would be a good idea to stay out of his threads.

Sergei Steshenko 04-22-2010 05:23 PM

Quote:

Originally Posted by MTK358 (Post 3944475)
It means that --architecture is not what I want.

Thanks for spending so much time clearing such an obvious thing up.

OK, so now you have in the same manner to analyze every next option in the output of

Code:

ld --help | less
.

In my case there are 222 lines altogether in the above output - this is less than 4 pages of "standard" text (66 lines per page). In the option there are options controlling the way/places 'ld' looks for files and there options related to file formats.

If/when you find the relevant options, read more detailed description in the manpage.

I'm just repeating it again: read, comprehend, analyze.

Sergei Steshenko 04-22-2010 05:26 PM

Quote:

Originally Posted by XavierP (Post 3944499)
Sergei - if you can see where MTK is going wrong, it would be far more useful if you would show him what he needs to do rather than berate him for not understanding what he is seeing. He seems to be trying to learn this himself so does not have the luxury of asking anyone outside LQ.

If you think that your method is the best for teaching, it would be a good idea to stay out of his threads.

I've shown the item in bold many times, and it's just read, comprehend, analyze.

XavierP 04-22-2010 06:09 PM

Quote:

Originally Posted by Sergei Steshenko (Post 3944505)
I've shown the item in bold many times, and it's just read, comprehend, analyze.

I agree, however MTK has said, repeatedly, that he doesn't understand. He obviously needs more help. You clearly understand this stuff and your knowledge could help MTK to progress his understanding and you clearly want to help. However, you need to meet him halfway - he wants to learn these things but is hitting snags and you could be the one to get him through them. So, please, at least point him at the right area of the less man page - make it a little "less" painful for him :)

Sergei Steshenko 04-23-2010 08:56 AM

[QUOTE=XavierP;3944537
...
He obviously needs more help.
...
[/QUOTE]

Community college English class ?

MTK358 04-23-2010 09:05 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3945197)
Community college English class ?

WTF?!?

I don't write poor english!

I JUST DON"T UNDERSTAND!

Anyway, I posted this issue on another forum because you obviously won't let me progress here.

And it was solved very quickly there and worked like a charm!

johnsfine 04-23-2010 09:44 AM

So far as I can tell, the man page for ld is not complete enough to even touch on the answer to MTK358's question.

The info page touches on the answer, but sure doesn't explain it. BTW, I find the info program hopelessly hard to navigate. To read info content, I always use Konqueror. In Konqueror type the location info:/ld then browse around.

The option you need seems to be --oformat but the value you need with that is not obvious to me. I'd probably need to see the contents of your linker.ld file to support even a half decent guess at the right --oformat switch. My wild unsupported guess would be
--oformat a.out-i386-linux

That choice was selected from the output on my 64 bit linux system from the command
objdump -i
I expect objdump -i would give the same choices on your system, but I'm not certain of even that. So you might want to post the output of that command as well.

Sergei Steshenko 04-23-2010 09:47 AM

Quote:

Originally Posted by MTK358 (Post 3945213)
WTF?!?

I don't write poor english!

I JUST DON"T UNDERSTAND!

Anyway, I posted this issue on another forum because you obviously won't let me progress here.

And it was solved very quickly there and worked like a charm!

It's not a matter of what/how you write, it's your inability to read, comprehend, analyze and as a result to clearly express what exactly you do not understand.

What exactly you do not understand in

Code:

ld --help | less
output ? I.e. what is the very first sentence you do not understand ?

In order to answer the above question you do not need any special (CS, math, etc) knowledge, you need only knowledge of English. So, again, what is you do not undernasm elf64stand ?

...

About posting in another forum - simple

nasm elf64

query into Google gives an answer (the 5-th match in my case), but, as I've noticed, you apparently do not read answers - always remember that item in red in this thread. You haven't yet explained what you can't understand in that item.

johnsfine 04-23-2010 10:07 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3945276)
It's not a matter what/how you write, it's your inability to read, comprehend, analyze

Please stop filling these threads with things like that.

Sometimes RTFM is the appropriate answer. But usually it isn't. What would the point of a forum be if the answer is always RTFM. And even RTFM doesn't need the level of criticism of the OP with which you delivered it.

Quote:

What exactly you do not understand in

Code:

ld --help | less

I think I know way more about the general topic than the OP, but virtually all of ld --help consists of vague hints that I can't even tell (without research elsewhere) whether I understand. Asking what someone doesn't understand in ld --help is totally unreasonable.

So far as MTK358 had any way of knowing, he wanted to control the architecture of the output file from ld. Look at the help and of course you would think you can do that with the -A switch, which you already abused him for not figuring out was wrong.

Quote:

I.e. what is the very first sentence you do not understand ?
I don't see many (maybe not any) sentences there. So I'll assume you mean phrase, not sentence. The first line is
Code:

-a KEYWORD    Shared library control for HP/UX compatibility
I don't understand that. I do understand enough (HP/UX) to guess that I don't need to understand it. But that isn't really understanding it.

Do you understand it? Give me an example of the use of the switch (replace KEYWORD with an actual value you would use there) and tell me what effect including that option would have on the behavior of ld. If you can't do that, I think you don't "understand" that line of the help. If you can do that, I think you got the knowledge from somewhere other than that line of help.

The next line is the one with "Set architecture". Before this thread, I might have thought I understood that. But details posted above show it means something other than what the uninitiated would have assumed.

So the question is not where is the part that's hard to understand. It's where is the part that isn't hard to understand.

Sergei Steshenko 04-23-2010 10:19 AM

Quote:

Originally Posted by johnsfine (Post 3945308)
Please stop filling these threads with things like that.

Sometimes RTFM is the appropriate answer. But usually it isn't. What would the point of a forum be if the answer is always RTFM. And even RTFM doesn't need the level of criticism of the OP with which you delivered it.



I think I know way more about the general topic than the OP, but virtually all of ld --help consists of vague hints that I can't even tell (without research elsewhere) whether I understand. Asking what someone doesn't understand in ld --help is totally unreasonable.

So far as MTK358 had any way of knowing, he wanted to control the architecture of the output file from ld. Look at the help and of course you would think you can do that with the -A switch, which you already abused him for not figuring out was wrong.



I don't see many (maybe not any) sentences there. So I'll assume you mean phrase, not sentence. The first line is
-a KEYWORD Shared library control for HP/UX compatibility

I don't understand that
. I do understand enough (HP/UX) to guess that I don't need to understand it. But that isn't really understanding it.

The next line is the one with "Set architecture". Before this thread, I might have thought I understood that. But details posted above show it means something other than what the uninitiated would have assumed.

So the question is not where is the part that's hard to understand. It's where is the part that isn't hard to understand.

I was clearly talking about format (do you need a proof or you'll believe me ?) and

ld --help | less

shows more than four matches of the 'format' substring. So, if the OP completely ignores the fact that clearly mentioned by me "format" word is indeed present in the built-in help message, what can I do ?

No regarding the item in bold. The problem is not that you do not understand it, the problem is that it is irrelevant for the info MT358 had to find.

Again, I told him to look for command line switches controlling the way 'ld' deals with file formats and with the places/ways it looks for libraries.

So, again and again, my point is that a person who understands English also understands he doesn't have to bother with that item any more WRT the task of finding info on formats and places/ways.

Sergei Steshenko 04-23-2010 10:24 AM

In the light of this discussion about (mis)understanding - does anybody still remember about the word "relevance" ? I.e. can those who say they do not understand use relevance as a tool while reading, comprehending and analyzing texts ?

johnsfine 04-23-2010 10:28 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3944504)
If/when you find the relevant options, read more detailed description in the manpage.

What does your copy of the manpage say about the format option that you think MTK358 should have used?

Maybe my copy of the man page is defective.

Quote:

Originally Posted by Sergei Steshenko (Post 3945332)
I was clearly talking about format (do you need a proof or you'll believe me ?)

I'll never know for sure, but in fact I don't believe you. My best guess is that you didn't know yourself the information that you abused MTK358 for not being able to find himself and that you apparently told him to get from a man page that as far as I can tell doesn't include it.

I'm going to try to drop out of this disagreement now, before a moderator forces me to.

I will continue to try to provide people like MTK358 with a short helpful answer (now buried far back in this thread) when such an answer is available to me, regardless of whether they could/should have found it themselves. I will reserve RTFM for cases where the OP needs the big chunk of knowledge that they can only reasonably get from doing the reading and can't get by my giving them the short answer.

BTW, I didn't notice until now that MTK358 found a different answer in the other forum:
http://forum.osdev.org/viewtopic.php...38907f#p175281
(as well as someone else disapproving of answering questions rather than forcing people to find the answers themselves).

I'm not sure now whether the answer I guessed from the info page is another usable answer or whether the answer from the other forum is the only correct one. The answer from the other forum looks even harder to guess from ld --help than the answer I gave.

brianL 04-23-2010 10:56 AM

Quote:

Originally Posted by Sergei Steshenko (Post 3945197)
Community college English class ?

You might consider trying that yourself, before criticising others, judging by these examples from your posts:
Quote:

why not doing what the linker wants from you ?
Despite of many times you've been suggested to read.
Which part of the item in red you do not understand ?


XavierP 04-23-2010 11:04 AM

We seem to have strayed far from topic. My recommendation to prevent closure is this:
  1. if you have any more suggestions for MTK and how he can solve his problem, continue here
  2. for discussions of teaching/reading/analyzing/comprehending issues, someone should create a new thread in General


All times are GMT -5. The time now is 07:59 PM.