Files
linux/tools/perf/tests/pe-file.c
T
Remi Bernon ed21d6d7c4 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 <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jacek Caban <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2020-09-04 14:38:15 -03:00

15 lines
446 B
C

// 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;
}