mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
PR273, SOM size -A
The SOM backend creates BFD sections for "spaces", and "sub-spaces". "sub-spaces" are what we normally think of as a section, "spaces" aggregate "sub-spaces". Thus it does not really make sense to include "spaces" for size -A since that would double count total size. It so happens that real sections ought to have at least one of the ALLOC and HAS_CONTENTS flags set, so this patch excludes "spaces" but excluding BFD sections with no flags set. PR 273 * size.c (sysv_internal_sizer, sysv_internal_printer): Exclude sections with no flag bits set. * testsuite/binutils-all/size.exp: Allow $CODE$ as a text section.
This commit is contained in:
@ -66,7 +66,7 @@ if {![binutils_assemble $srcdir/$subdir/bintest.s tmpdir/bintest.o]} then {
|
||||
|
||||
set got [binutils_run $SIZE "$SIZEFLAGS -A ${testfile}"]
|
||||
|
||||
set want "${testfile}.*(text|TEXT|P)\[^\n\r\]*\[ \]($dec)\[ \]+$dec.*(\\.data|DATA|D_1)\[^\n\r\]*\[ \]($dec)\[ \]+$dec"
|
||||
set want "${testfile}.*(text|TEXT|\\\$CODE\\\$|P)\[^\n\r\]*\[ \]($dec)\[ \]+$dec.*(\\.data|DATA|D_1)\[^\n\r\]*\[ \]($dec)\[ \]+$dec"
|
||||
|
||||
if ![regexp $want $got all textname textsize dataname datasize] then {
|
||||
fail "size -A"
|
||||
|
Reference in New Issue
Block a user