parseReadelfSections

fnReadelfSection[] parseReadelfSections(string output)

Parser for readelf -SW (wide) output.

Handles the space-padded low section numbers ([ 0]), empty names for the NULL section, missing flag fields, hexadecimal address/offset/size/ entry-size columns, and decimal link/info/alignment columns.

Parameters

outputThe stdout output from the readelf -SW command.

Returns

Array of ReadelfSection structs containing parsed section information.

Throws

Exception if the output cannot be parsed.