[U-Boot-Users] Relocation of symbols?
Andreas Block
andreas.block at esd-electronics.com
Thu Jun 30 10:10:52 CEST 2005
29.06.2005 19:32:46, Wolfgang Denk <wd at denx.de> wrote:
>In message <8ECMIB8MIIC528283SP05OJFEB784F.42c2ad3d at pc-block> you wrote:
>>
>> >I still can't understand why you cannot simply use an unitialized
>> >pointer, or even one which has a random init value, and then adjust
>> >it in your board specific code, say in a misc_init_r() or maybe even
>> >in a board_early_init_r() function?
>>
>> Hmm, I take this as a refusal to help and a refusal to acquire new information.
>> For me
>
>Bollocks. Why don't you just take it as what it is: a question, and
>the attempt to understand your situation?
>
>The attitude you display here does not really add to my motivation to
>dig into this later tonight as I originally intended.
Well, I'm sorry. I didn't want to sound rude. I was a bit dissappointed, because it
seemed to me like you were ignoring great parts of my last post and sort of retreated
to safer grounds.
Perhaps you could explain to me, how you think I could initialize the declared array at
those positions you propose (it's not a problem of finding the referenced functions,
but of knowing how to do it). I've sent a small example as answer to Rune Torgersen,
which shows quite well, that one can't initialize/locate an "open" array (like fpgadata
[]) by initializing a pointer of the same name. Seemingly it's me, who's failing to
see, but I don't get how your hint helps me with this.
>> this is quite a basic problem, perhaps with my understanding, but meanwhile I guess
>> not with my understanding, but with U-Boot itself. I'm not really looking for
>> a workaround.
>
>That's a pity, because a workaround is probably easier available.
Sure. The project is actually working. All I'd like to do is to remove the changes done
to common code and understand, where my problem with U-Boot stems from. If it's me,
who's not getting it or if there's perhaps a slightly strange/non-generic behaviour in
U-Boot. It took me quite a while to find out about my initialization problem and the
non-relocated array-content (it was actually my debug output, which stayed in flash and
wasn't of any help, when my PLD programmer killed the PLD and thus the flash access)
and I would like to avoid such pain in the future.
>> The workaround for me, would be to change the common code and do another round of
>
>I think you could do without such a change. This may require a little
>hack, and may even result in a not strictly standard conforming im-
>plementation, but I think it can be done.
>
>> failed. And once again, your suggestion to initialize a pointer in my project
>> dependent code, absolutely ignores the fact, that the array is declared in
>> common code as:
>>
>> extern const char walter[];
>>
>> Perhaps you don't see a difference to the following notation, which I had to use in
>> my project dependent code:
>>
>> extern const char *walter;
>>
>> But there is one, even if you refuse to recognize. Feel free to ask, if you'd like
>> to know.
>
>I have no idea why you think I ignored your arguments. I never said
>anything like this. Of course there is a difference. I am perfectly
>aware of this. But does it really prevent you from doing what you
>want to do? There is so many things you can do. For a little demon-
>stration of what can be done in C have a look at the winning entries
>of the IOCCC at http://www.de.ioccc.org/years.html :-)
Well, at first, you cut away three quarters of my last post. Second, you told me in one
of your answers, that the compiler knows no differences between these initializations
and told me, U-Boot wasn't able to distinguish between them either. And no, it does not
entirely prevent me from what I want to do, but it keeps me from doing it the smoothest
way or the way I'd like to do it best.
>> I also wonder, whether the issue with the relocation of statically initialized
pointers
>> is solved?
>
>There is no "issue" from my point of view. We know the situation, and
>we know how to live with it (by manually relocating the pointers).
>
>When I ran into this situation 5 years ago I didn't find a better
>solution in a reasonable time. Feel free to show me that there is a
>better approach.
I'm afraid, I currently don't have the knowledge, nor the time (at least not at work)
to do it in a better way. But I thought, perhaps you would like to at least discuss the
way it's done now and perhaps, combined with your knowledge of how the things are
running today, come to see a new/better/more generic way of doing it. But please don't
get me wrong again, I certainly don't want to sound like I'm requesting a change in U-
Boot or something alike.
Best regards,
Andreas Block
More information about the U-Boot
mailing list