HBehrens / puncover

Analyses C/C++ build output for code size, static variables, and stack usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.rodata is not added in code size

Kasimashi opened this issue · comments

Hi,

Using arm-none-eabi-size I'm getting the code size of a random file containning .rodata

arm-none-eabi-size "autogen/sl_iostream_init_eusart_instances.o" -A
autogen/sl_iostream_init_eusart_instances.o  :
section                                            size   addr
.text                                                 0      0
.data                                                 0      0
.bss                                                  0      0
.rodata.sl_iostream_eusart_init_vcom.str1.1          47      0
.text.sl_iostream_eusart_init_vcom                  176      0
.text.events_handler                                 24      0
.text.sl_iostream_eusart_init_instances              28      0
.text.EUART0_RX_IRQHandler                           12      0
.text.EUART0_TX_IRQHandler                            4      0
.text.sl_iostream_eusart_vcom_sleep_on_isr_exit      12      0
.rodata.str1.1                                        5      0
.rodata                                              32      0
.bss.context_vcom                                   112      0
.bss.events_handle                                    8      0
.bss.rx_buffer_vcom                                  32      0
.bss.sl_iostream_vcom                                36      0
.data.events_info                                     8      0
.data.sl_iostream_instance_vcom_info                 16      0
.data.sl_iostream_uart_vcom_handle                    4      0
.data.sl_iostream_vcom_handle                         4      0
(...)
arm-none-eabi-size "autogen/sl_iostream_init_eusart_instances.o"
   text    data     bss     dec     hex filename
    340      32     188     560     230 autogen/sl_iostream_init_eusart_instances.o

Using puncover I have this values :

image

Here is the source file if needed :
sl_iostream_init_eusart_instances.zip

For bss and static : the value seems to be correct.
But for .text I've a gap of 80.
I think .rodata is not taken into account in the calculation.

Please can you check this ?
Morever what about .data section ?

BR

Kasimashi