[Openmp-commits] [PATCH] D68053: [OpenMP] Don't assume Type from `readelf -d` has parentheses
Jan Beich via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 25 14:41:22 PDT 2019
jbeich created this revision.
jbeich added a reviewer: OpenMP.
Herald added subscribers: openmp-commits, guansong, krytarowski.
Herald added a reviewer: jdoerfert.
Herald added a project: OpenMP.
jbeich edited the summary of this revision.
FreeBSD uses readelf from ELFToolChain which has slightly different output.
See https://sourceforge.net/p/elftoolchain/tickets/544/
$ mv /usr/local/bin/readelf{,.orig}
$ cmake .
$ make libomp-micro-tests
[...]
check-depends.pl: (x) Fail to parse readelf output:
check-depends.pl: (x)
check-depends.pl: (x) Dynamic section at offset 0xad3f0 contains 30 entries:
check-depends.pl: (x) Tag Type Name/Value
check-depends.pl: (x) >>> 0x0000000000000001 NEEDED Shared library: [libm.so.5]
check-depends.pl: (x) 0x0000000000000001 NEEDED Shared library: [libthr.so.3]
check-depends.pl: (x) 0x0000000000000001 NEEDED Shared library: [libc.so.7]
check-depends.pl: (x) 0x000000000000000e SONAME Library soname: [libomp.so]
check-depends.pl: (x) 0x0000000000000007 RELA 0x115e8
check-depends.pl: (x) 0x0000000000000008 RELASZ 45048 (bytes)
check-depends.pl: (x) 0x0000000000000009 RELAENT 24 (bytes)
check-depends.pl: (x) 0x000000006ffffff9 RELACOUNT 1841
check-depends.pl: (x) 0x0000000000000017 JMPREL 0x1c5e0
check-depends.pl: (x) 0x0000000000000002 PLTRELSZ 4320 (bytes)
check-depends.pl: (x) 0x0000000000000003 PLTGOT 0xb3810
check-depends.pl: (x) 0x0000000000000014 PLTREL RELA
check-depends.pl: (x) 0x0000000000000006 SYMTAB 0x270
check-depends.pl: (x) 0x000000000000000b SYMENT 24 (bytes)
check-depends.pl: (x) 0x0000000000000005 STRTAB 0xb2d4
check-depends.pl: (x) 0x000000000000000a STRSZ 25357 (bytes)
check-depends.pl: (x) 0x000000006ffffef5 GNU_HASH 0x74c0
check-depends.pl: (x) 0x0000000000000004 HASH 0x903c
check-depends.pl: (x) 0x0000000000000019 INIT_ARRAY
check-depends.pl: (x) 0x000000000000001b INIT_ARRAYSZ 16 (bytes)
check-depends.pl: (x) 0x000000000000001a FINI_ARRAY
check-depends.pl: (x) 0x000000000000001c FINI_ARRAYSZ 8 (bytes)
check-depends.pl: (x) 0x000000000000000c INIT 0xabb1c
check-depends.pl: (x) 0x000000000000000d FINI 0x5f420
check-depends.pl: (x) 0x000000006ffffff0 VERSYM 0x6a20
check-depends.pl: (x) 0x000000006ffffffc VERDEF 0x72c4
check-depends.pl: (x) 0x000000006ffffffd VERDEFNUM 13
check-depends.pl: (x) 0x000000006ffffffe VERNEED 0x7430
check-depends.pl: (x) 0x000000006fffffff VERNEEDNUM 3
check-depends.pl: (x) 0x0000000000000000 NULL 0x0
check-depends.pl: (x) (eof)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68053
Files:
openmp/runtime/tools/check-depends.pl
Index: openmp/runtime/tools/check-depends.pl
===================================================================
--- openmp/runtime/tools/check-depends.pl
+++ openmp/runtime/tools/check-depends.pl
@@ -131,7 +131,7 @@
# 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 );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68053.221838.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190925/4d6b09a7/attachment.bin>
More information about the Openmp-commits
mailing list