[PATCH 1/3] makedep: Align PE sections so they can be mmapped.

Rémi Bernon rbernon at codeweavers.com
Mon May 25 09:32:38 CDT 2020

This should help linux perf tool match the binary files on disk with the
code regions in memory.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>

This is my old perf patch series rebased and using the recent CROSSDEBUG
variable to get split debug info. I'm assuming that the only use cases
are PDB split debug info or DWARF split debug info into ELF files for
perf, as I don't know any other, but if having DWARF debug in PE files
is actually useful for something then these patches are incorrect.

I could also see that some CROSSDEBUG checks look for "split" prefix in
makedep, and some other set the variable to dwarf. It's not clear to me
what this variable is supposed to be set to (other than "pdb"). Does
"dwarf" mean separate file as well?

 tools/makedep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/makedep.c b/tools/makedep.c
index 536d2263e35f..250250382fa8 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -3317,6 +3317,7 @@ static void output_module( struct makefile *make )
     if (debug_file) output_filename( strmake( "-Wl,--debug-file,%s", debug_file ));
     output_filenames( all_libs );
     output_filename( make->is_cross ? "$(CROSSLDFLAGS)" : "$(LDFLAGS)" );
+    output_filename( make->is_cross ? "-Wl,--file-alignment,4096" : "" );
     output( "\n" );
     if (make->unixobj_files.count)

More information about the wine-devel mailing list