https://bugs.winehq.org/show_bug.cgi?id=55964
--- Comment #1 from Bernhard Übelacker bernhardu@mailbox.org --- Just for reference, the PDB filename hides in the ".buildid" section:
x86_64-w64-mingw32-objdump libmono-2.0-x86_64.dll --full-contents | grep ibmonosgen-2.0.p -A2 -B7 Contents of section .buildid: 18042b000 00000000 83eb2e65 00000000 02000000 .......e........ 18042b010 57000000 1cb04200 1c9a4200 52534453 W.....B...B.RSDS 18042b020 d81d12a9 828fa723 4c4c4420 5044422e .......#LLD PDB. 18042b030 01000000 2f766167 72616e74 2f627569 ..../vagrant/bui 18042b040 6c642f6d 6f6e6f2d 7838365f 36342f6d ld/mono-x86_64/m 18042b050 6f6e6f2f 6d696e69 2f2e6c69 62732f6c ono/mini/.libs/l 18042b060 69626d6f 6e6f7367 656e2d32 2e302e70 ibmonosgen-2.0.p 18042b070 646200 db. Contents of section .data:
Unfortunately I found no easy way to edit this information in a finished dll.
But as another workaround that worked for me, following just does a hard replacement:
cp -a libmono-2.0-x86_64.dll libmono-2.0-x86_64.dll.orig x86_64-w64-mingw32-objcopy libmono-2.0-x86_64.dll --dump-section .buildid=tmp.tmp sed -i -E "s@ibs/libmonosgen-2.0.pdb@/libmono-2.0-x86_64.pdb@g" tmp.tmp x86_64-w64-mingw32-objcopy libmono-2.0-x86_64.dll --update-section .buildid=tmp.tmp
cp -a libmono-2.0-x86.dll libmono-2.0-x86.dll.orig x86_64-w64-mingw32-objcopy libmono-2.0-x86.dll --dump-section .buildid=tmp.tmp sed -i -E "s@/libmonosgen-2.0.pdb@/libmono-2.0-x86.pdb@g" tmp.tmp x86_64-w64-mingw32-objcopy libmono-2.0-x86.dll --update-section .buildid=tmp.tmp
(The sed command might also work on the plain dll file, too.)