valerian NA wrote: > Hi all, > > I work with a linux cross-compiler (codesourcery with gcc 4.2.3) for > embedded powerpc targets (mpc8248). > So I tried to compile u-boot (version 1.1.6). It works fine with another > and older version of gcc (3.3.2) but with the new cross-compiler (4.2.3) > I have trouble to do this part : > powerpc-linux-gnu-objcopy --gap-fill 0xff -O binary u-boot u-boot.bin > > This command freezes and uses a lot of memory without sucess (maybe I > have not enough disk space).
Symptom of an inadvertent *large* gap in your "LOAD" sections. > I decided to launch without "--gap-fill" to see the reaction : > powerpc-linux-gnu-objcopy -O binary u-boot u-boot.bin > It creates u-boot.bin file, and the system (host ls -al) tells that this > file has a size nearest to 4GiB > > So I think it's a problem in the mapping of u-boot : > powerpc-linux-gnu-objdump -h u-boot > > u-boot: file format elf32-powerpc > > Sections: > Idx Name Size VMA LMA File off Algn > 0 .text 00017e18 fc000000 fc000000 00002138 2**2 > CONTENTS, ALLOC, LOAD, READONLY, CODE > 1 .reloc 00000804 fc018000 fc018000 0001a138 2**0 > CONTENTS, ALLOC, LOAD, DATA > 2 .data 00001060 fc018804 fc018804 0001a93c 2**2 > CONTENTS, ALLOC, LOAD, DATA > 3 .data.rel.ro.local 0000003c fc019864 fc019864 0001b99c 2**2 > CONTENTS, ALLOC, LOAD, DATA > 4 .data.rel 0000003c fc0198a0 fc0198a0 0001b9d8 2**2 > CONTENTS, ALLOC, LOAD, DATA > 5 .data.rel.local 00000634 fc0198dc fc0198dc 0001ba14 2**2 > CONTENTS, ALLOC, LOAD, DATA > 6 .ppcenv 00000200 fc019f10 fc019f10 0001c048 2**2 > CONTENTS, ALLOC, LOAD, DATA > 7 .u_boot_cmd 000000dc fc01a110 fc01a110 0001c248 2**2 > CONTENTS, ALLOC, LOAD, DATA > 8 .bss 00001bf8 fc01b000 fc01b000 0001d138 2**3 > ALLOC [snip] > 13 .rodata.str1.1 0000209e 00000660 00000660 00000094 2**0 > CONTENTS, ALLOC, LOAD, READONLY, DATA What is .rodata.str1.1? Is it new to gcc 4.2.3? It is being located at the start of memory where all the rest of your "LOAD" sections are at the end of memory. The result: 4GB binary images. You need to locate this is a better location (close to the rest of the "LOAD" sections). [snip] > Thanks a lot for your attention and your futurs ideas... > > Val. HTH, gvb ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users