[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31687] New: [avr] Output of avr-objdump -P mem-usage missi
From: |
gjl at gcc dot gnu.org |
Subject: |
[Bug binutils/31687] New: [avr] Output of avr-objdump -P mem-usage missing .rodata |
Date: |
Tue, 30 Apr 2024 16:46:58 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31687
Bug ID: 31687
Summary: [avr] Output of avr-objdump -P mem-usage missing
.rodata
Product: binutils
Version: 2.42
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: gjl at gcc dot gnu.org
Target Milestone: ---
As is appears, objdump deas ot consider output section .rodata.
.rodata output section is only present on emulations avrtiny, avrxmega3,
avrxmega2_flmap and avrxmega4_flmap.
For example, for some avrxmega3 device with the following
$ avr-objdump -h foo.elf
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 0000001c 00802800 0000015f 00000213 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 00000158 00000000 00000000 000000b4 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .rodata 00000007 00004158 00000158 0000020c 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .bss 00000008 0080281c 0080281c 0000022f 2**0
ALLOC
4 .noinit 00000001 00802824 00802824 0000022f 2**0
ALLOC
Which are the following sizes in decimal:
.data = 28
.text = 344
.rodata = 7
.bss = 8
.noinit = 1
The expected flash consumption is .text + .data + .rodata = 379 bytes, and RAM
consumption is .data + .bss + .noinit = 37 bytes.
The report from avr-size is correct:
text data bss dec hex filename
351 28 9 388 184 foo.elf
but the report from avr-objdump -P mem-usage is not:
AVR Memory Usage
----------------
Device: atmega4808
Program: 372 bytes (0.8% Full)
(.text + .data + .bootloader)
Data: 37 bytes (0.6% Full)
(.data + .bss + .noinit)
The "Program" size is missing .rodata.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31687] New: [avr] Output of avr-objdump -P mem-usage missing .rodata,
gjl at gcc dot gnu.org <=