[U-Boot-Users] Does u-boot relocate absolute symbols?

Andreas Block andreas.block at esd-electronics.com
Thu Jun 30 14:44:17 CEST 2005


Yes, thanks. Sorry, It might have been a bit too early in the morning. But even with 
correction the result stays the same.

Regards,
Andreas Block


30.06.2005 14:05:44, Jerry Van Baren <gerald.vanbaren at smiths-aerospace.com> wrote:

>Andreas Block wrote:
>> 29.06.2005 17:46:03, "Rune Torgersen" <runet at innovsys.com> wrote:
>> 
>> 
>>>I just have to comment on this.
>>>
>>>
>>>>It does not work (because it's simply wrong) to declare 
>>>>fpgadata as follows in pf5200.c 
>>>>(although looking good in the first place, if you think about 
>>>>it, the compiler needs to 
>>>>handle both declarations differently):
>>>>
>>>>const unsigned char *fpgadata = 0x400000; /* (with 0x400000 
>>>>being the address to store 
>>>>the image with TFTP at) */
>>>>
>>>
>>>Have you tried to do this?
>>>Because it should work (even if one is declared char [] and the other
>>>char *)
>> 
>> 
>> Sure, I've tried this. This is the point, where my problem arose. Attached you find 
two 
>> small files, you can easily compile under linux (gcc -o arrtest -I ./ ./common.c 
>> ./array.c). The file "common.c" represents the code I can't (don't want to) touch. 
>> "array.c" represents my project dependent code. If you run arrtest it will show to 
you, 
>> that it is not possible to initialize the array "test" in this manner. After looking 
at 
>> the disassembly, it is pretty clear, that the compiler has to generate different 
code 
>> for the two notations.
>> 
>> Nevertheless, thanks for your hint,
>> Andreas Block
>
>I assume this was a typo and not in your actual test program?
>
>--- common.c-original	2005-06-30 08:03:26.286019864 -0400
>+++ common.c	2005-06-30 08:03:48.815779191 -0400
>@@ -4,7 +4,7 @@
>
>  int showwrong(void)
>  {
>-	printf("test[]: 0x%08X\n");
>+	printf("test[]: 0x%08X\n", (int)test);
>  	return 0;
>  }
>
>gvb
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>_______________________________________________
>U-Boot-Users mailing list
>U-Boot-Users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
>







More information about the U-Boot mailing list