| 1 |
#!/usr/bin/env perl |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
|
| 6 |
while (<>) |
| 7 |
{ |
| 8 |
s/ __getsockname / getsockname /; |
| 9 |
s/ __sigaction / sigaction /; |
| 10 |
s/ __GI___/ __/; |
| 11 |
s/ __([a-z]*)_nocancel / $1 /; |
| 12 |
|
| 13 |
# "lib[S|s]ystem*" occurs on Darwin, "libsocket" on older Solaris/illumos. |
| 14 |
s/\(in \/.*(libc|libSystem|libsystem|libsocket|libsys).*\)$/(in \/...libc...)/; |
| 15 |
s/\(within \/.*(libc|libSystem|libsystem|libsocket).*\)$/(within \/...libc...)/; |
| 16 |
|
| 17 |
# Filter out dynamic loader |
| 18 |
s/ \(in \/.*ld-.*so\)$//; |
| 19 |
|
| 20 |
# Remove the filename -- on some platforms (eg. Linux) it will be in |
| 21 |
# libc, on some (eg. Darwin) it will be in the main executable. |
| 22 |
s/\(below main\) \(.+\)$/(below main)/; |
| 23 |
s/start \(in \/usr\/lib\/system\/libdyld.dylib\)/(below main)/; |
| 24 |
|
| 25 |
# libc on x86 FreeBSD |
| 26 |
s#_start1 \(src/lib/csu/i386/crt1_c.c.*#(below main)#; |
| 27 |
s#__libc_start1 \(in /...libc...\)#(below main)#; |
| 28 |
|
| 29 |
# on Illumos |
| 30 |
s#_start_crt \(in .*#(below main)#; |
| 31 |
|
| 32 |
# filter out the exact libc-start.c:### line number. (ppc64*) |
| 33 |
s/\(libc-start.c:[0-9]*\)$/(in \/...libc...)/; |
| 34 |
|
| 35 |
# Merge the different C++ operator variations. |
| 36 |
s/(at.*)__builtin_new/$1...operator new.../; |
| 37 |
s/(at.*)operator new\(unsigned(| int| long)\)/$1...operator new.../; |
| 38 |
|
| 39 |
s/(at.*)__builtin_vec_new/$1...operator new.../; |
| 40 |
s/(at.*)operator new\[\]\(unsigned(| int| long)\)/$1...operator new[].../; |
| 41 |
|
| 42 |
s/(at.*)__builtin_delete/$1...operator delete.../; |
| 43 |
s/(at.*)operator delete\(void\*(, unsigned(| int| long))?\)/$1...operator delete.../; |
| 44 |
|
| 45 |
s/(at.*)__builtin_vec_delete/$1...operator delete[].../; |
| 46 |
s/(at.*)operator delete\[\]\(void\*\)/$1...operator delete[].../; |
| 47 |
|
| 48 |
# Some glibc versions complain about unexpected futex syscall errors. |
| 49 |
# With or without newline (see sourceware PR20271). |
| 50 |
next if /^The futex facility returned an unexpected error code.$/; |
| 51 |
s/The futex facility returned an unexpected error code.//; |
| 52 |
|
| 53 |
print; |
| 54 |
} |
| 55 |
|
| 56 |
exit 0; |