This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[avr] Displaying memory usage info
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: <binutils at sourceware dot org>
- Cc: <nickc at redhat dot com>, <cynt6007 at vandals dot uidaho dot edu>, <avr at gjlay dot de>
- Date: Sun, 13 Jul 2014 01:39:45 +0530
- Subject: [avr] Displaying memory usage info
- Authentication-results: sourceware.org; auth=none
The AVR target has a patch floating around for the size utility that
calculates sizes in a slightly different manner, and reports memory usage
in percent terms (the patch hardcodes available memory per
device).
Previous attempts to upstream the patch weren't successful.
(https://sourceware.org/ml/binutils/2013-01/msg00401.html). I thought
I'd take a stab at implementing it the way Nick suggested. Here's what
I'm planning to do.
1. Embed device memory capabilities in a .note section in the crt file
(no binutils changes, change avr-libc's gcrt1.S).
3. Use objdump's private options feature to add a -Pmem-usage option
that consumes the data in the .note section and then prints out
the usage information, like the patch does now.
Does this look like a reasonable approach. Would you guys have any
problems taking in a patch that implements the above?