<div dir="ltr">Hi<div><br><div>Over at RTEMS, I started investigating BSPs where size is confused and reports large sizes for .bss which appear to be close to the actual physical memory size on the target board. This seems to happen when the BSP's linker script does not have the expected bss start and end symbols. About half of the 13 architectures supported by RTEMS have at least one BSP with this problem.<br><br>Picking one at random, this is what size reports:<br><br>aarch64-a53_lp64_qemu: 103014       2080    134078296    134183390    7ff79de   hello.exe<br><br>This is what rtems-exeinfo reports for the .bss size </div></div><div><br></div><div> .bss               WA------------ addr: 0x401007c0 0x40103488 size:      11464 align:  64 relocs:      0<br><br>And this is what readelf -S reports<br><br>[18] .bss              NOBITS           00000000401007c0  00030798<br>       0000000000002cc8  0000000000000000  WA       0     0     64</div><div><br></div><div>I have cc'ed Chris Johns who wrote rtems-exeinfo. Hopefully he can help explain why the rtems-exeinfo section information does not match readelf. <br><br>size appears to look for bss start and end symbols which are architecture specific to get the size. If this correct, is there a list of what symbols are needed? <br><br>If this isn't documented, which installed linker script for is best to look at? Or which suffix indicates the linker script used to link executables.<br><br>I assume we will have to fix BSP linker scripts one at a time until size reports a reasonable value but it would be nice to know what size looks for so we can ensure size informatoin is correct.<br><br>Thanks.</div><div><br></div><div>--joel</div></div>