sub ProcessMapFile { my $self = shift; my $MapFile = $_[0]; my $PlaceToPutInformation = $_[1]; #Each config profile defines its own way how to parse the map-file. my $iterator = $ProfileInformation->{'StartLine'}; #Process map-file for ( $iterator ; $iterator < @$MapFile ; $iterator++ ) { if ( $MapFile->[$iterator] =~ m! ^ #Begin with.. (\S+) #matiching non space character: START Memory \s+ #space characters (\S+) #matiching non space character: END Memory \s+ #space characters (\S+) #matiching non space character: Size \s+ #space characters (\S+) #matiching non space character: Symbol (g = global, l = static) \s+ #space characters (\S+) #matiching non space character: Name \s+ #space characters (\S+) #matiching non space character: Memory \s+ #space characters (\S+) #matiching non space character: Output Section \s+ #space characters (\S+) #matiching non space character: Input Section \s+ #space characters (\S+) #matiching non space character: Input Object !x ) { #Process Zero sized (uninitialized) memory $PlaceToPutInformation->{'Maps'}{'HIGHTEC'}{$5} = { 'Start' => $1, 'End' => $2, 'Size' => $3, 'Symbol' => $4, 'Memory' => $6, 'OutputSection' => $7, 'InputSection' => $8, 'InputObject' => $9, }; $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OverallSize'} = 0 if ( not exists $PlaceToPutInformation->{'Memory'}{'HIGHTEC'} {'OverallSize'} ); $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OverallSize'} = $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OverallSize'} + $3; $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'}{$6} = 0 if ( not exists $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'} {$6} ); $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'}{$6} = $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'Memory'}{$6} + $3; $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OutputSection'}{$7} = 0 if ( not exists $PlaceToPutInformation->{'Memory'}{'HIGHTEC'} {'OutputSection'}{$7} ); $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OutputSection'}{$7} = $PlaceToPutInformation->{'Memory'}{'HIGHTEC'}{'OutputSection'} {$7} + $3; } else { last; } } # This is line 157 #Create Array of Names for quick check! my @a = keys( %{ $PlaceToPutInformation->{'Maps'}{'HIGHTEC'} } ); $PlaceToPutInformation->{'SymbolCollection'}{'HIGHTEC'} = \@a if (@a); }