Minor fix to parsing of readelf output. Allow a hyphen in the section name, and allow 6 digit fields (i.e. section size) to be longer than 6 digits. rs=ben.

This commit is contained in:
bryner%brianryner.com 2003-11-09 07:05:21 +00:00
parent 73a5400bc7
commit 06f39bad4f

View File

@ -87,7 +87,7 @@ while (<READELF_OUTPUT>) {
# note that we strip off the leading '.' of section names for
# readability
if (! (@section = (/^ *\[ *(\d+)\] \.([\w\.]+) *(\w+) *(.{8}) (.{6}) (.{6}) *(\d+) ([a-zA-Z]+ +| +[a-zA-Z]+|) *(\d+) *(\w+) *(\d+)/))) {
if (! (@section = (/^ *\[ *(\d+)\] \.([\w\.\-]+) *(\w+) *(.{8}) (.{6}[0-9a-fA-F]*) (.{6}[0-9a-fA-F]*) *(\d+) ([a-zA-Z]+ +| +[a-zA-Z]+|) *(\d+) *(\w+) *(\d+)/))) {
# capture the 'null' section which has no name, so that the
# array indices are the same as the section indices.