bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/31687] [avr] Output of avr-objdump -P mem-usage missing .r


From: gjl at gcc dot gnu.org
Subject: [Bug binutils/31687] [avr] Output of avr-objdump -P mem-usage missing .rodata
Date: Fri, 17 May 2024 09:43:50 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31687

--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Created attachment 15526
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15526&action=edit
Proposed patch

AVR: binutils/31687 - Include .rodata size in avr-objdump -P mem-usage.

AVR emulations with a .rodata output section were missing the
size of that section in  avr-objdump -P mem-usage.  These are
the emulations that keep .rodata in program memory, which can
be supported by devices that see (a part of) the program memory
in the RAM address space.

The patch also introduces a code clean-up related to PR 27283,
which was about broken binaries that lead to overflow / UB in
size computation.  The section size is now just truncated or
saturated, alongside with a diagnostic about the truncation and
*which* section length is being truncated.

binutils/
        PR binutils/31687
        * od-elf32_avr.c (elf32_avr_get_truncated_size): New static function.
        (elf32_avr_get_memory_usage): Use it to get (truncated) section sizes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]