builder: sizes: list interrupt vector as a pseudo-package for -size=full

This is another bit of memory that is now correctly accounted for in
`-size=full`.
This commit is contained in:
Ayke van Laethem
2023-03-06 00:06:08 +01:00
committed by Ron Evans
parent de281191e0
commit ea97c60959
3 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -371,7 +371,7 @@ func loadProgramSize(path string, packagePathMap map[string]string) (*programSiz
if section.Flags&elf.SHF_ALLOC == 0 {
continue
}
if packageSymbolRegexp.MatchString(symbol.Name) {
if packageSymbolRegexp.MatchString(symbol.Name) || symbol.Name == "__isr_vector" {
addresses = append(addresses, addressLine{
Address: symbol.Value,
Length: symbol.Size,
@@ -834,6 +834,8 @@ func findPackagePath(path string, packagePathMap map[string]string) string {
} else if packageSymbolRegexp.MatchString(path) {
// Parse symbol names like main$alloc or runtime$string.
packagePath = path[:strings.LastIndex(path, "$")]
} else if path == "__isr_vector" {
packagePath = "C interrupt vector"
} else if path == "<Go type>" {
packagePath = "Go types"
} else if path == "<Go interface assert>" {