Don't assume Type from `readelf -d` has parentheses

Patch by jbeich (Jan Beich)

Differential Revision: https://reviews.llvm.org/D68053

llvm-svn: 374038
This commit is contained in:
Andrey Churbanov 2019-10-08 12:39:04 +00:00
parent f34271d886
commit ca2973bb20
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ sub get_deps_readelf($) {
# Parse body.
while ( $i < @bulk ) {
my $line = $bulk[ $i ];
if ( $line !~ m{^\s*0x[0-9a-f]+\s+\(([_A-Z0-9]+)\)\s+(.*)\s*$}i ) {
if ( $line !~ m{^\s*0x[0-9a-f]+\s+\(?([_A-Z0-9]+)\)?\s+(.*)\s*$}i ) {
parse_error( $tool, @bulk, $i );
}; # if
my ( $type, $value ) = ( $1, $2 );