Yeah, except the output from avr32-size -B teletype.elf seems to have a very odd value for bss:
text data bss dec hex filename
81034 7504 237872 326410 4fb0a teletype.elf
237872 is a lot bigger than the 96k or RAM the AV32UC3B0512 has!
Compared with the output from avr32-size -A teletype.elf:
teletype.elf :
section size addr
.reset 8204 2147483648
.rela.got 0 2147491852
.init 26 2147491852
.text 55604 2147491880
.exception 512 2147547648
.fini 24 2147548160
.rodata 16664 2147548184
.dalign 4 4
.ctors 8 8
.dtors 8 16
.jcr 4 24
.got 0 28
.data 7484 28
.balign 0 7512
.bss 8064 7512
.heap 74536 15576
.comment 47 0
.stack 8192 90112
.flash_nvram 147076 2147745792
Total 35427671
(I removed the .debug_* lines)
If we apply a bit of unix voodoo, with avr32-size -A teletype.elf | grep '^\..*' | grep -v '^.debug.*' | sort -k 3, we can sort by address:
.comment 47 0
.dalign 4 4
.ctors 8 8
.dtors 8 16
.jcr 4 24
.data 7484 28
.got 0 28
.balign 0 7512
.bss 8064 7512
.heap 74536 15576
.stack 8192 90112
.reset 8204 2147483648
.init 26 2147491852
.rela.got 0 2147491852
.text 55604 2147491880
.exception 512 2147547648
.fini 24 2147548160
.rodata 16664 2147548184
.flash_nvram 147076 2147745792
Which is really nice as you get a very visual layout of RAM and ROM (the ROM starts at 2147483648 / 0x80000000). It’s worth noting that .flash_nvram does not start at the end of .rodata, but instead starts at 0x80040000 as defined in config.mk.
I’ve also discovered the readelf utility. Try avr32-readelf -e teletype.elf and the even longer avr32-readelf -a teletype.elf.