diff options
author | Remi Bernon <rbernon@codeweavers.com> | 2020-08-21 18:52:38 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-09-04 14:38:15 -0300 |
commit | ed21d6d7c48e6e96c2d617e304a7ebfbd17b1807 (patch) | |
tree | c73451b740880b6e52a68186df59db77a55ba059 /tools/perf/tests/pe-file.c | |
parent | eac9a4342e5447cade4d484261a8992e2ec6f138 (diff) |
perf tests: Add test for PE binary format support
This adds a precompiled file in PE binary format, with split debug file,
and tries to read its build_id and .gnu_debuglink sections, as well as
looking up the main symbol from the debug file. This should succeed if
libbfd is supported.
Committer testing:
$ perf test "PE file support"
68: PE file support : Ok
$
Signed-off-by: Remi Bernon <rbernon@codeweavers.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jacek Caban <jacek@codeweavers.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200821165238.1340315-3-rbernon@codeweavers.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/pe-file.c')
-rw-r--r-- | tools/perf/tests/pe-file.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/tests/pe-file.c b/tools/perf/tests/pe-file.c new file mode 100644 index 000000000000..eb3df5e9886f --- /dev/null +++ b/tools/perf/tests/pe-file.c @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 + +// pe-file.exe and pe-file.exe.debug built with; +// x86_64-w64-mingw32-gcc -o pe-file.exe pe-file.c +// -Wl,--file-alignment,4096 -Wl,--build-id +// x86_64-w64-mingw32-objcopy --only-keep-debug +// --compress-debug-sections pe-file.exe pe-file.exe.debug +// x86_64-w64-mingw32-objcopy --strip-debug +// --add-gnu-debuglink=pe-file.exe.debug pe-file.exe + +int main(int argc, char const *argv[]) +{ + return 0; +} |