summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2024-05-08 23:03:05 +0200
committerAndreas Fankhauser hiddenalpha.ch2024-05-08 23:03:05 +0200
commita5386000f39c9bedb0cfe6924d33ff5c04cfd815 (patch)
tree601f325784ea441c79c4378cbbe6224013c6bdde
parent8e29d34ac66df8e8da36c6a13d4b1e83b2209f42 (diff)
downloadUnspecifiedGarbage-a5386000f39c9bedb0cfe6924d33ff5c04cfd815.zip
UnspecifiedGarbage-a5386000f39c9bedb0cfe6924d33ff5c04cfd815.tar.gz
Add some doc for ELF and PE32 dependency scanning.
-rw-r--r--doc/note/binutils/dumpbin.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/doc/note/binutils/dumpbin.txt b/doc/note/binutils/dumpbin.txt
index 638cf8f..0b08077 100644
--- a/doc/note/binutils/dumpbin.txt
+++ b/doc/note/binutils/dumpbin.txt
@@ -2,17 +2,23 @@
DumpBin For Windoof
===================
-## Analyze PE32 / PE32+ files.
+Scan for unwanted dependencies
+------------------------------
-TODO: This is unusable, because this only works with lots of bloat installed.
+Linux:
-Location: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe"
+ find build/bin -type f -print0|xargs -0I? sh -c 'echo ?;readelf -d ?|egrep NEEDED|egrep -v "\\[(libc\\.|libz\\.|libm\\.|libdl\.|libpthread\.)"'
-Help
- dumpbin /?
+Windoof:
-List needed DLLs.
+ find build/bin/*.exe -print0|xargs -0I? sh -c 'echo ?;objdump -p ?|egrep -i DLL\ Name:|egrep -iv "(KERNEL32.dll|msvcrt.dll|USER32.dll|WS2_32.dll)"'
- dumpbin /DEPENDENTS foo.exe
+
+
+
+List Dll Dependencies Of A PE32 Executable
+------------------------------------------
+
+ x86_64-w64-mingw32-objdump -p out.exe | grep 'DLL Name:'