使用
afl-cc
這是 afl-fuzz 的輔助應用程序。它可以作為 gcc 和 clang 的直接替代品,讓您使用所需的運行時工具重新編譯第三方代碼。
1.?-help
顯示可用選項
afl-cc -help
其他選項同上,這里不再展開敘述。
afl-clang
1. --help
顯示可用選項
afl-clang --help
其他選項同上,這里不再展開敘述。
afl-clang++
1. --help?
顯示可用選項
afl-clang++ --help
其他選項同上,這里不再展開敘述。
afl-clang-fast
1. --help?
顯示可用選項
afl-clang-fast --help
其他選項同上,這里不再展開敘述。
afl-clang-fast++
1. --help?
顯示可用選項
afl-clang-fast++ --help
其他選項同上,這里不再展開敘述。
afl-clang-lto
1. --help?
顯示可用選項
afl-clang-lto --help
其他選項同上,這里不再展開敘述。
afl-clang-lto++
1. --help?
顯示可用選項
afl-clang-lto++ --help
其他選項同上,這里不再展開敘述。
afl-cmin
AFL++ 語料庫最小化工具(awk 版本)
1. 幫助文檔
afl-cmin
必需參數
2. -i dir
包含起始語料庫的輸入目錄
3. -o dir
最小化文件的輸出目錄
afl-cmin -i inputs -o minimized_inputs -- ./target_app @@
執行控制設置
4. -T tasks
并行運行任務數(默認值:1,all=nproc)
afl-cmin -i inputs -o minimized_inputs -T 4 -- ./target_app @@
?
5. -f file
模糊測試程序讀取的位置(默認值:stdin)
afl-cmin -i inputs -o minimized -f input.txt -- ./target_app
6. -m megs
子進程內存限制 (MB)
afl-cmin -i inputs -o minimized -m 100 -- ./target_app @@
7. -t msec
子進程運行時間限制(默認值:5000)
afl-cmin -i inputs -o minimized -t 10000 -- ./target_app @@
8. -O
使用純二進制插樁(FRIDA 模式)
AFL_FRIDA_INST=1 afl-cmin -i inputs -o minimized -O -- ./target_app @@
9. -Q
使用純二進制插樁(QEMU 模式)
afl-cmin -i inputs -o minimized -Q -- ./target_app @@
10. -U
使用基于 Unicorn 的插樁(Unicorn 模式)
afl-cmin -i inputs -o minimized -U -- ./target_app @@
11. -X
使用 Nyx 模式
afl-cmin -i inputs -o minimized -X -- ./target_app @@
最小化設置
12. -A
允許崩潰和超時(不推薦)
afl-cmin -i inputs -o minimized -A -- ./target_app @@
13. -C
保留崩潰輸入,拒絕其他所有
afl-cmin -i crashes -o minimized -C -- ./target_app @@
14. -e
僅求解邊緣覆蓋率,忽略命中計數
afl-cmin -i inputs -o minimized -e -- ./target_app @@
afl-cmin.bash
?1. 幫助文檔
afl-cmin.bash
其他選項同上,這里不再展開敘述。
afl-fuzz
1. 幫助文檔
afl-fuzz
必需參數
2. -i dir
包含測試用例的輸入目錄(或使用“-”恢復,另請參閱 AFL_AUTORESUME)
3. -o dir
模糊器結果的輸出目錄
afl-fuzz -i input -o findings -- ./target @@
4. -P Strategy
設置修復突變策略:探索(關注新的覆蓋率),利用(關注觸發崩潰)。您還可以設置在沒有任何發現后的秒數,切換到漏洞利用模式,并在新的覆蓋范圍內恢復(默認值:1000)。
afl-fuzz -i input -o findings -P 1000 -- ./target @@
5. -p schedule
電源計劃計算種子的性能分數:explore(探索)(默認)、fast(快速)、exploit(利用)、seek(查找)、rare(罕見)、mmopt、coe、linquad - 更多信息請參閱 docs/FAQ.md
afl-fuzz -i input -o findings -p explore -- ./target @@
afl-fuzz -i input -o findings -p fast -- ./target @@
afl-fuzz -i input -o findings -p exploit -- ./target @@
afl-fuzz -i input -o findings -p seek -- ./target @@
afl-fuzz -i input -o findings -p rare -- ./target @@
afl-fuzz -i input -o findings -p mmopt -- ./target @@
afl-fuzz -i input -o findings -p coe -- ./target @@
afl-fuzz -i input -o findings -p linquad -- ./target @@
?
6. -f file
模糊測試程序讀取的位置(默認值:stdin 或 @@)
afl-fuzz -i input -o findings -f input.txt -- ./target @@
7. -t msec
每次運行的超時時間(自動縮放,默認值為 1000 毫秒)。添加“+”可自動計算超時時間,該值為最大值。
afl-fuzz -i input -o findings -t 1000 -- ./target @@
8.?-m megs
子進程內存限制(0 MB,0 = 無限制 [默認])
afl-fuzz -i input -o findings -m 200 -- ./target @@
9. -O
使用純二進制插樁(FRIDA 模式)
afl-fuzz -i input -o findings -O -- ./target @@
10. -Q
使用純二進制插樁(QEMU 模式)
afl-fuzz -i input -o findings -Q -- ./target @@
11. -U
使用基于 Unicorn 的插樁(Unicorn 模式)
afl-fuzz -i input -o findings -U -- ./target @@
12. -W
使用基于 qemu 的 Wine 插樁(Wine 模式)
afl-fuzz -i input -o findings -W -- ./target @@
13. -X
使用虛擬機模糊測試(NYX 模式 - 獨立模式)
afl-fuzz -i input -o findings -X -- ./target @@
14. -Y
使用虛擬機模糊測試(NYX 模式 - 多實例模式)
afl-fuzz -i input -o findings -Y -- ./target @@
Mutator 設置
15. -a type
目標輸入格式,“文本”或“二進制”(默認:generic(通用))
afl-fuzz -i input -o findings -a text -- ./target @@
16. -g minlength
設置生成的模糊測試輸入的最小長度(默認:1)
afl-fuzz -i input -o findings -g 1 -- ./target @@
17. -G maxlength
設置生成的模糊測試輸入的最大長度(默認:1048576)
afl-fuzz -i input -o findings -G 1048576 -- ./target @@
18. -L minutes
使用 MOpt(imize) 模式并設置進入 Pacemaker 模式的時間限制(無新發現的分鐘數)。 0 = 立即,-1 = 立即并伴隨正常變異。
注意:此選項通常效果不佳。
afl-fuzz -i input -o findings -L 0 -- ./target @@
afl-fuzz -i input -o findings -L 1 -- ./target @@
19. -c program
通過指定為其編譯的二進制文件來啟用 CmpLog。如果使用 QEMU/FRIDA 或模糊測試目標已為 CmpLog 編譯,則使用“-c 0”。要禁用 Cmplog,請使用“-c -”。
afl-fuzz -i input -o findings -c 0 -- ./target @@
afl-fuzz -i input -o findings -c - -- ./target @@
20. -l cmplog_opts
CmpLog 配置值(例如“2ATR”):1 = 小文件,2 = 大文件(默認),3 = 所有文件,A = 算術求解,T = 變換求解,X = 極限變換求解,R = 隨機著色字節。
afl-fuzz -i input -o findings -I 2ATR -- ./target @@
afl-fuzz -i input -o findings -I 1AXR -- ./target @@
afl-fuzz -i input -o findings -I 3ATR -- ./target @@
模糊測試行為設置
21. -Z
使用順序隊列選擇,而非加權隨機
afl-fuzz -i input -o findings -Z -- ./target @@
22. -N
不取消鏈接模糊測試輸入文件(適用于設備等)
afl-fuzz -i input -o findings -N -- ./target @@
23. -n
不使用插樁進行模糊測試(非插樁模式)
afl-fuzz -i input -o findings -n -- ./target @@
24. -x dict_file
模糊測試器字典(參見 README.md,最多指定 4 次)
afl-fuzz -i input -o findings -x admin.txt -- ./target @@
測試設置
25. -s seed
使用固定種子作為隨機數生成器 (RNG)
afl-fuzz -i input -o findings -s 100 -- ./target @@
26. -V seconds
模糊測試指定時間后終止(僅限模糊測試時間!)
afl-fuzz -i input -o findings -V 30 -- ./target @@
27. -E execs
模糊測試大約執行次數后終止
注意:不精確,可能會有多次執行。
afl-fuzz -i input -o findings -E 1000 -- ./target @@
其他設置
28. -M/-S id
分布式模式(-M 設置 -Z 并禁用修剪)。有關并行模糊測試的有效建議,請參閱 docs/fuzzing_in_depth.md#c-using-multiple-cores 。
afl-fuzz -i input -o findings -M master -- ./target @@
afl-fuzz -i input -o findings -S master -- ./target @@
?
29. -F path
同步到外部模糊測試隊列目錄(需要 -M 參數,最多可指定 32 次)
afl-fuzz -i input -o findings -M master -F output -- ./target @@
30. -z
跳過增強型確定性模糊測試(請注意,舊的 -d 和 -D 參數將被忽略。)
afl-fuzz -i input -o findings -z -- ./target @@
31. -T text
屏幕上顯示的文本橫幅
afl-fuzz -i input -o findings -T "MyFuzzer" -- ./target @@
32. -I command
發現新的崩潰時執行此命令/腳本
afl-fuzz -i input -o findings -I "./notify_crash.sh" -- ./target @@
?
33. -C
崩潰探索模式(類似秘魯兔子的模式)
afl-fuzz -i input -o findings -C -- ./target @@
34. -b cpu_id
將模糊測試進程綁定到指定的 CPU 核心 (0-...)
afl-fuzz -i input -o findings -b 2 -- ./target @@
35. -e ext
模糊測試輸入文件的文件擴展名(如果需要)
afl-fuzz -i input -o findings -e fuzz -- ./target @@
afl-g++
1.?--help
顯示此信息。
afl-g++ --help
2. -pass-exit-codes
退出階段并返回最高錯誤代碼。
afl-g++ target.c -pass-exit-codes
3.?--target-help
顯示特定目標平臺的命令行選項。
afl-g++ --target-help
4.?--help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...].
顯示特定類型的命令行選項。(使用“-v --help”顯示子進程的命令行選項)。
afl-g++ --help=common
afl-g++ --help=optimizers
afl-g++ --help=params
afl-g++ --help=target
afl-g++ --help=warnings
afl-g++ --help=joined
afl-g++ --help=separate
afl-g++ --help=undocumented
5.?--version
顯示編譯器版本信息。
afl-g++ --version
6.?-dumpspecs
顯示所有內置規范字符串。
afl-g++ -dumpspecs
7.?-dumpversion
顯示編譯器的版本。
afl-g++ -dumpversion
8.?-dumpmachine
顯示編譯器的目標處理器。
afl-g++ -dumpmachine
9.?-print-search-dirs
顯示編譯器搜索路徑中的目錄。
afl-g++ -print-search-dirs
10.?-print-libgcc-file-name
顯示編譯器配套庫的名稱。
afl-g++ -print-libgcc-file-name
11.?-print-file-name=<lib>
顯示庫 <lib> 的完整路徑。
afl-g++ -print-file-name=lib
12.?-print-prog-name=<prog>
顯示編譯器組件 <prog> 的完整路徑。
afl-g++ -print-prog-name=prog
13. -print-multiarch
顯示目標的規范化 GNU 三元組,用作庫路徑中的組成部分。
afl-g++ -print-multiarch
14.?-print-multi-directory
顯示 libgcc 各個版本的根目錄。
afl-g++ -print-multi-directory
15.?-print-multi-lib
顯示命令行選項與多個庫搜索目錄之間的映射。
afl-g++ -print-multi-lib
16.?-print-multi-os-directory
顯示操作系統庫的相對路徑。
afl-g++ -print-multi-os-directory
17.?-print-sysroot
顯示目標庫目錄。
afl-g++ -print-sysroot
18.?-print-sysroot-headers-suffix
顯示用于查找頭文件的 sysroot 后綴。
afl-g++ -print-sysroot-headers-suffix
19.?-Wa,<options>
將逗號分隔的 <options> 傳遞給匯編器。
afl-g++ -Wa
?
20. -Wp,<options>
將逗號分隔的 <options> 傳遞給預處理器。
afl-g++ -Wp
21. -Wl,<options>
將逗號分隔的 <options> 傳遞給鏈接器。
afl-g++ -WI
22. -Xassembler <arg>
將 <arg> 傳遞給匯編器。
afl-g++ -Xassembler
23. -Xpreprocessor <arg>
將 <arg> 傳遞給預處理器。
afl-g++ -Xpreprocessor arg
24. -Xlinker <arg>
將 <arg> 傳遞給鏈接器。
afl-g++ -Xlinker arg
25. -save-temps
不刪除中間文件。
afl-g++ target.c -save-temps
26. -save-temps=<arg>
不刪除中間文件。
27. -no-canonical-prefixes
構建相對前綴到其他 gcc 組件時,不規范化路徑。
afl-g++ target.c -no-canonical-prefixes
28. -pipe
使用管道而不是中間文件。
afl-g++ target.c -pipe
29. -time
計算每個子進程的執行時間。
afl-g++ target.c -time
30. -specs=<file>
使用 <file> 的內容覆蓋內置規范。
afl-g++ target.c -specs=target
31. -std=<standard>
假設輸入源為 <standard>。
afl-g++ target.c -std=standard
32. --sysroot=<directory>
使用 <directory> 作為頭文件和庫文件的根目錄。
afl-g++ target.c --sysroot=directory
33. -B <directory>
將 <directory> 添加到編譯器的搜索路徑。
afl-g++ target.c -B target
34. -v
顯示編譯器調用的程序。
afl-g++ target.c -v
35. -###
與 -v 類似,但選項會被引用,命令不會被執行。
afl-g++ target.c -###
36. -E
僅預處理;不編譯、匯編或鏈接。
afl-g++ target.c -E
37. -S
僅編譯;不匯編或鏈接。
afl-g++ target.c -S
38. -c
編譯和匯編,但不鏈接。
afl-g++ target.c -c
39. -o <file>
將輸出放入 <file>。
afl-g++ target.c -o output/
40. -pie
創建動態鏈接的位置無關的可執行文件。
afl-g++ target.c -pie
41. -shared
創建共享庫。
afl-g++ target.c -shared
42.?-x <language>
指定以下輸入文件的語言。
允許的語言包括:c c++ assembler none
“none”表示恢復默認行為,即根據文件擴展名猜測語言。
afl-g++ target.c -x c
afl-g++ target.c -x c++
afl-g++ target.c -x assembler
afl-g++ target.c -x none
afl-g++-fast
1.?--help
顯示此信息。
afl-g++-fast --help
其他選項同上,這里不再展開敘述。
afl-gcc
1.?--help
顯示此信息。
afl-gcc --help
其他選項同上,這里不再展開敘述。
afl-gcc-fast
1.?--help
顯示此信息。
afl-gcc-fast --help
其他選項同上,這里不再展開敘述。
afl-gotcpu
afl-gotcpu 打印可用的 CPU
afl-gotcpu
afl-ld-lto
1.?--help
打印選項幫助
afl-ld-lto --help
2. -(
--start-group 的別名
3. -)
--end-group 的別名
4. --allow-multiple-definition
允許多個定義
5. --allow-shlib-undefined
允許共享庫中未解析的引用(鏈接共享庫時默認)
6. --android-memtag-heap
指示動態加載器為堆啟用 MTE 保護
7. --android-memtag-mode=<value>
指示動態加載器在 MTE 模式下啟動(async(異步), sync(同步), none(無))
8. --android-memtag-stack
指示動態加載器準備進行 MTE 堆棧插樁
9. --apply-dynamic-relocs
為動態重定位應用鏈接時值
10. --as-needed
僅在使用共享庫時設置 DT_NEEDED
11. --auxiliary=<value>
將 DT_AUXILIARY 字段設置為指定名稱
afl-ld-lto target.c -( -) --allow-multiple-definition --allow-shlib-undefined --android-memtag-heap --android-memtag-mode=none --android-memtag-stack --apply-dynamic-relocs --as-needed --auxiliary=test
12. --Bdynamic
鏈接共享庫(默認)
13. --be8
使用 BE8 格式寫入 Big Endian ELF 文件(僅限 AArch32)
14. --Bno-symbolic
不為 -shared 本地綁定默認可見性定義的符號(默認)
15. --Bshareable
為 --shared 的別名
16. --Bstatic
不鏈接共享庫
17. --Bsymbolic-functions
為 -shared 本地綁定默認可見性定義的函數符號
18. --Bsymbolic-non-weak-functions
為 -shared 本地綁定默認可見性定義的 STB_GLOBAL 函數符號
19. --Bsymbolic-non-weak
為 -shared 本地綁定默認可見性定義的 STB_GLOBAL 符號
20. --Bsymbolic
為 -shared 本地綁定默認可見性定義的符號
21. --build-id=[fast,md5,sha1,uuid,0x<hexstring>]
生成構建 ID 說明
22. --build-id
為 --build-id=sha1 的別名
23. -b <value>
為 --format 的別名
afl-ld-lto target.c --Bdynamic --be8 --Bno-symbolic --Bshareable --Bstatic --Bsymbolic-functions --Bsymbolic-non-weak-functions --Bsymbolic-non-weak --Bsymbolic --build-id=fast --build-id -b csv
24. --call-graph-ordering-file=<value>
布局節以優化給定的調用圖
25. --call-graph-profile-sort=[none,hfsort,cdsort]
使用指定算法對調用圖配置文件中的輸入節進行重新排序(默認值:cdsort)
26. --call_shared
--Bdynamic 的別名
27. --check-sections
檢查節地址是否存在重疊(默認值)
28. --cmse-implib
將輸出庫設置為 CMSE 安全代碼導入庫
29. --color-diagnostics=[auto,always,never]
在診斷中使用顏色(默認值:auto)
30. --color-diagnostics
--color-diagnostics=always 的別名
31. --compress-debug-sections=[none,zlib,zstd]
壓縮 DWARF 調試節
32. --compress-sections=<section-glob>={none,zlib,zstd}[:level]
壓縮與 glob 匹配且不包含 SHF_ALLOC 標志的輸出節。如果壓縮內容較大,則部分內容將保持未壓縮狀態。壓縮級別為 <level>(如果指定)或默認的以速度為重點的級別。
33. --cref
輸出交叉引用表。如果指定了 -Map 選項,則打印到映射文件
afl-ld-lto target.c --call-graph-ordering-file=test --call-graph-profile-sort=none --call_shared --check-sections --cmse-implib --color-diagnostics=auto --color-diagnostics --compress-debug-sections=none --compress-sections=section-glob=none --cref
34. --debug-names
生成合并的 .debug_names 段
35. --default-script=<value>
如果沒有指定 --script 選項,則讀取此默認鏈接器腳本
36. --defsym=<symbol>=<value>
定義符號別名
37. --demangle
解除符號名稱(默認)
38. --dependency-file=<file>
寫入依賴文件
39. --dependent-libraries
處理輸入文件中的依賴庫說明符(默認)
40. --disable-new-dtags
禁用新的動態標簽
41. --discard-all
刪除所有本地符號
42. --discard-locals
刪除臨時本地符號
43. --discard-none
保留符號表中的所有符號
44. --dn
--Bstatic 的別名
45. -dT <value>
--default-script 的別名
46. --dynamic-linker=<value>
使用哪個動態鏈接器
47. --dynamic-list=<file>
類似于 --export-dynamic-symbol-list。創建共享對象時,這還隱含了 -Bsymbolic 選項,但不設置 DF_SYMBOLIC。
48. --dy
為 --Bdynamic 的別名。
afl-ld-lto target.c --debug-names --default-script=test --defsym=test --demangle --dependency-file=input/sample.txt --dependent-libraries --disable-new-dtags --discard-all --discard-locals --discard-none --dn -dT test --dynamic-linker=test --dynamic-list=test --dy
49. --EB
在 OUTPUT_FORMAT 中選擇大端格式
50. --eh-frame-hdr
請求創建 .eh_frame_hdr 段和 PT_GNU_EH_FRAME 段頭
51. --EL
在 OUTPUT_FORMAT 中選擇小端格式
52. --emit-relocs
在輸出中生成重定位
53. --enable-new-dtags
啟用新的動態標簽(默認)
54. --enable-non-contiguous-regions
將輸入段溢出到后續匹配的輸出段,以避免內存區域溢出
55. --end-group
為兼容 GNU,除非您指定 --warn-backrefs,否則忽略此參數
56. --end-lib
結束一組對象,這些對象應被視為在同一個歸檔文件中
57. --entry=<entry>
入口點符號的名稱
58. --error-handling-script=<value>
指定錯誤處理腳本
59. --error-limit=<value>
停止前發出的最大錯誤數(0 = 無限制)
60. --error-unresolved-symbols
報告將未解析的符號視為錯誤
61. --exclude-libs=<value>
將靜態庫從自動導出中排除
62. --execute-only
將可執行段標記為不可讀
63. --export-dynamic-symbol-list=file
讀取動態符號模式列表。對每個模式應用 --export-dynamic-symbol
64. --export-dynamic-symbol=glob
(可執行文件)將匹配的符號放入動態符號表。(共享對象)對匹配的非本地 STV_DEFAULT 符號的引用不應綁定到共享對象內的定義。不代表 -Bsymbolic。
65. --export-dynamic
將符號放入動態符號表
66. -E
--export-dynamic 的別名
67. -e <value>
--entry 的別名
afl-ld-lto target.c --EB --eh-frame-hdr --EL --emit-relocs --enable-new-dtags --enable-non-contiguous-regions --end-group --end-lib --entry=test --error-handling-script=test --error-limit=0 --error-unresolved-symbols --exclude-libs=test --execute-only --export-dynamic-symbol-list=output --export-dynamic-symbol=glob --export-dynamic -E -e test
68. --fat-lto-objects
使用 fat LTO 目標文件中包含 LLVM 位碼的 .llvm.lto 節來執行 LTO。
69. --fatal-warnings
將警告視為錯誤
70. --filter=<value>
將 DT_FILTER 字段設置為指定名稱
71. --fini=<symbol>
指定終結器函數
72. --fix-cortex-a53-843419
修復 AArch64 Cortex-A53 錯誤 843419
73. --fix-cortex-a8
修復 ARM Cortex-A8 錯誤 657417
74. --force-group-allocation
僅對 -r 選項有意義。節組將被丟棄。如果兩個節組成員被放置到同一個輸出節中,則也合并它們的重定位
75. --format=[default,elf,binary]
使用此選項更改輸入的格式
76. --fortran-common
在存檔成員中搜索定義以覆蓋 COMMON 符號(默認)
77. -F <value>
--filter 的別名
78. -f <value>
--auxiliary 的別名
79. --gc-sections
啟用未使用節的垃圾回收
80. --gdb-index
生成 .gdb_index 節
81. --gnu-unique
啟用 STB_GNU_UNIQUE 符號綁定(默認)
82. --hash-style=<value>
指定哈希樣式(sysv、gnu 或兩者)
afl-ld-lto target.c --fat-lto-objects --fatal-warnings --filter=test --fini=test --fix-cortex-a53-843419 --fix-cortex-a8 --force-group-allocation --format=default --fortran-common -F test -f test --gc-sections --gdb-index --gnu-unique --hash-style=sysv
83. -h <value>
--soname 的別名
84. --icf=all
啟用相同代碼折疊
85. --icf=none
禁用相同代碼折疊(默認)
86. --icf=safe
啟用安全的相同代碼折疊
87. --ignore-data-address-equality
lld 可能會破壞數據的地址相等性
88. --ignore-function-address-equality
lld 可能會破壞函數的地址相等性
89. --image-base=<value>
設置基址
90. --in-implib=<file>
讀取現有的 CMSE 安全代碼導入庫,并在生成的新 CMSE 安全代碼導入庫中保留入口函數地址(創建 CMSE 安全鏡像時可選)
91. --init=<symbol>
指定初始化函數
92. --just-symbols=<value>
僅鏈接符號
93. --keep-unique=<value>
在 ICF 期間不折疊此符號
afl-ld-lto target.c -h test --icf=all --icf=none --icf=safe --ignore-data-address-equality --ignore-function-address-equality --image-base=test --in-implib=test --init=test --just-symbols=test --keep-unique=test
94. --library-path=<value>
將 <dir> 添加到庫搜索路徑
95. --library-path <value>
將 <dir> 添加到庫搜索路徑
96. --library=<value>
搜索庫 <libname>
97. --library <value>
搜索庫 <libname>
98. --load-pass-plugin=<value>
從插件庫加載pass
99. --lto-aa-pipeline=<value>
在LTO期間運行的AA流水線。與 -lto-newpm-passes 結合使用
100. --lto-basic-block-address-map
為 LTO 生成基本塊地址映射
101. --lto-basic-block-sections=<value>
為 LTO 啟用基本塊段
102. --lto-CGO<cgopt-level>
LTO 的代碼生成優化級別
103. --lto-cs-profile-file=<value>
上下文敏感的配置文件路徑
104. --lto-cs-profile-generate
執行上下文敏感的 PGO 插樁
105. --lto-debug-pass-manager
調試新的 pass 管理器
106. --lto-emit-asm
生成匯編代碼
107. --lto-emit-llvm
生成 LLVM-IR 位碼
108. --lto-known-safe-vtables=<value>
啟用 --lto-validate-all-vtables-have-type-in??fos 后,跳過對這些 vtable(_ZTV 符號)的驗證
109. --lto-newpm-passes=<value>
待運行的 pass LTO 期間
110. --lto-O<opt-level>
LTO 優化級別
111. --lto-partitions=<value>
LTO 代碼生成分區數量
112. --lto-pgo-warn-mismatch
開啟配置文件不匹配警告(默認)
113. --lto-sample-profile=<value>
示例配置文件路徑
114. --lto-unique-basic-block-section-names
為 LTO 的每個基本塊部分指定唯一名稱
115. --lto-validate-all-vtables-have-type-in??fos
驗證所有虛表是否包含 LTO 鏈接的類型信息
116. --lto-whole-program-visibility
斷言 LTO 鏈接具有全程序可見性
117. --lto=[full,thin]
設置 LTO 后端
118. -L <dir>
將 <dir> 添加到庫搜索路徑
119. -l <libname>
搜索庫 <libname>
afl-ld-lto target.c --library-path=output --library=output --load-pass-plugin=output --lto-aa-pipeline=output --lto-basic-block-address-map --lto-basic-block-sections=output --lto-CGO 10 --lto-cs-profile-file=output --lto-cs-profile-generate --lto-debug-pass-manager --lto-emit-asm --lto-emit-llvm --lto-known-safe-vtables=output --lto-newpm-passes=output --lto-O 10 --lto-partitions=10 --lto-pgo-warn-mismatch --lto-sample-profile=output --lto-unique-basic-block-section-names --lto-validate-all-vtables-have-type-infos --lto-whole-program-visibility --lto=full -L output -l output
120.?--Map=<value>
將鏈接映射打印到指定文件
121. --merge-exidx-entries
啟用合并 .ARM.exidx 條目(默認)
122. --mllvm=<value>
用于轉發到 LLVM 選項處理的附加參數
123. --mmap-output-file
對輸出文件進行 Mmap 寫入(默認)
124. -M
--print-map 的別名
125. -m <value>
設置目標仿真
afl-ld-lto target.c --Map=output --merge-exidx-entries --mllvm=output --mmap-output-file -M -m output
126. --nmagic
不按頁面對齊部分,鏈接靜態庫。
127. --no-allow-multiple-definition
不允許多重定義(默認)
128. --no-allow-shlib-undefined
不允許共享庫中存在未解析的引用(鏈接可執行文件時默認)
129. --no-apply-dynamic-relocs
不為動態重定位應用鏈接時值(默認)
130. --no-as-needed
始終為共享庫設置 DT_NEEDED(默認)
131. --no-check-sections
不檢查段地址是否重疊
132. --no-color-diagnostics
--color-diagnostics=never 的別名
133. --no-debug-names
不生成合并的 .debug_names 段(默認)
134. --no-demangle
不分離符號名稱
135. --no-dependent-libraries
忽略輸入文件中的依賴庫說明符
136. --no-dynamic-linker
禁止輸出 .interp 段
137. --no-eh-frame-hdr
不創建 .eh_frame_hdr 段
138. --no-execute-only
將可執行段標記為可讀(默認)
139. --no-export-dynamic
不將符號放入動態符號表(默認)
140. --no-fat-lto-objects
忽略可重定位目標文件中的 .llvm.lto 段(默認)。
141. --no-fatal-warnings
不將警告視為錯誤(默認)
142. --no-fortran-common
不搜索存檔成員以查找覆蓋 COMMON 符號的定義
143. --no-gc-sections
禁用未使用段的垃圾回收(默認)
144. --no-gdb-index
不生成 .gdb_index 段(默認)
145. --no-gnu-unique
禁用 STB_GNU_UNIQUE 符號綁定
146. --no-lto-basic-block-address-map
不為 LTO 生成基本塊地址映射(默認)
afl-ld-lto target.c --nmagic --no-allow-multiple-definition --no-allow-shlib-undefined --no-apply-dynamic-relocs --no-as-needed --no-check-sections --no-color-diagnostics --no-debug-names --no-demangle --no-dependent-libraries --no-dynamic-linker --no-eh-frame-hdr --no-execute-only --no-export-dynamic --no-fat-lto-objects --no-fatal-warnings --no-fortran-common --no-gc-sections --no-gdb-index --no-gnu-unique --no-lto-basic-block-address-map
147. --no-lto-pgo-warn-mismatch
關閉關于配置文件配置不匹配的警告
148. --no-lto-unique-basic-block-section-names
不為 LTO 的每個基本塊部分指定唯一名稱(默認)
149. --no-lto-validate-all-vtables-have-type-in??fos
不驗證所有 Vtable 是否都具有 LTO 鏈接的類型信息
150. --no-lto-whole-program-visibility
斷言 LTO 鏈接不具有全程序可見性
151. --no-merge-exidx-entries
禁用合并 .ARM.exidx 條目
152. --no-mmap-output-file
不映射輸出文件進行寫入
153. --no-nmagic
頁對齊部分(默認)
154. --no-omagic
不將文本數據部分設置為可寫,頁對齊部分(默認)
155. --no-optimize-bb-jumps
不刪除末尾到下一個基本塊的任何直接跳轉(默認)
156. --no-pcrel-optimize
(PowerPC64) 禁用 PC 相對優化
157. --no-pie
不創建位置無關的可執行文件(默認)
158. --no-power10-stubs
--power10-stubs=no 的別名
159. --no-print-gc-sections
不列出已刪除的未使用段(默認)
160. --no-print-icf-sections
不列出相同的折疊段(默認)
161. --no-relax-gp
禁用全局指針松弛(默認)
162. --no-relax
禁用特定目標平臺的松弛
163. --no-rosegment
不將只讀的不可執行段放入其自己的段中
164. --no-toc-optimize
(PowerPC64) 禁用目錄相關優化
165. --no-undefined-version
報告引用未定義符號的版本腳本
166. --no-undefined
即使鏈接器正在創建共享庫,也報告未解析的符號
167. --no-use-android-relr-tags
使用 SHT_RELR / DT_RELR* 標簽(默認)
168. --no-warn-backrefs
不警告提取存檔成員時出現的反向符號引用(默認)
169. --no-warn-common
不警告重復的公共符號(默認)
170. --no-warn-ifunc-textrel
不警告將 ifunc 符號與文本重定位一起使用的情況(默認)
171. --no-warn-mismatch
抑制某些未知類型的錯誤
172. --no-warn-symbol-ordering
不警告符號排序文件的問題
173. --no-warnings
抑制警告并取消 --fatal-warnings
174. --no-whole-archive
不強制加載靜態庫中的所有成員(默認)
175. --noinhibit-exec
只要可執行輸出文件仍然可用,就保留它
176. --non_shared
--Bstatic 的別名
177. --nostdlib
僅搜索命令行中指定的目錄
178. -N
--omagic 的別名
179. -n
--nmagic 的別名
afl-ld-lto target.c --no-lto-pgo-warn-mismatch --no-lto-unique-basic-block-section-names --no-lto-validate-all-vtables-have-type-infos --no-lto-whole-program-visibility --no-merge-exidx-entries --no-mmap-output-file --no-nmagic --no-omagic --no-optimize-bb-jumps --no-pcrel-optimize --no-pie --no-power10-stubs --no-print-gc-sections --no-print-icf-sections --no-relax-gp --no-relax --no-rosegment --no-toc-optimize --no-undefined-version --no-undefined --no-use-android-relr-tags --no-warn-backrefs --no-warn-common --no-warn-ifunc-textrel --no-warn-mismatch --no-warn-symbol-ordering --no-warnings --no-whole-archive --noinhibit-exec --non_shared --nostdlib -N -n
180. --oformat=[elf,binary]
指定輸出目標文件的二進制格式
181. --omagic
將文本和數據部分設置為可讀寫,不進行頁面對齊,并鏈接到靜態庫
182. --opt-remarks-filename <value>
用于優化備注的 YAML 輸出文件
183. --opt-remarks-format <value>
用于序列化備注的格式(默認值:YAML)
184. --opt-remarks-hotness-threshold=<value>
輸出優化備注所需的最小配置文件數量。使用“auto”可應用配置文件摘要中的閾值。
185. --opt-remarks-passes <value>
需要序列化到輸出文件的passes的正則表達式
186. --opt-remarks-with-hotness
在優化備注文件中包含熱度信息
187. --optimize-bb-jumps
移除末尾到下一個基本塊的直接跳轉
188. --orphan-handling=<value>
控制使用鏈接器腳本時如何處理孤立段
189. --out-implib=<file>
將CMSE安全代碼導入庫輸出到<文件>(創建CMSE安全映像時必需)
190. --output=<value>
-o的別名
191. --output <value>
-o的別名
192. -O <value>
優化輸出文件大小
193. -o <path>
寫入輸出的文件路徑
afl-ld-lto target.c --oformat=binary --omagic --opt-remarks-filename output --opt-remarks-format YAML --opt-remarks-hotness-threshold=auto --opt-remarks-passes output --opt-remarks-with-hotness --optimize-bb-jumps --orphan-handling=output --out-implib=output --output=output -O 32 -o output
194. --pack-dyn-relocs=[none,android,relr,android+relr]
以指定格式打包動態重定位
195. --package-metadata=<value>
發出包元數據說明
196. --pcrel-optimize
(PowerPC64) 啟用 PC 相對優化(默認)
197. --pic-executable
--pie 的別名
198. --pic-veneer
始終生成與位置無關的 thunk(veneer)
199. --pie
創建與位置無關的可執行文件
200. --plugin-opt=-<value>
指定 LLVM 選項以兼容 LLVMgold.so
201. --plugin-opt=cs-profile-generate
--lto-cs-profile-generate 的別名
202. --plugin-opt=cs-profile-path=<value>
--lto-cs-profile-file 的別名
203. --plugin-opt=debug-pass-manager
--lto-debug-pass-manager 的別名
204. --plugin-opt=disable-verify
--disable-verify?的別名
205. --plugin-opt=dwo_dir=<value>
使用 LTO 和 debug fission 時存儲 .dwo 文件的目錄
206. --plugin-opt=emit-asm
--lto-emit-asm 的別名
207. --plugin-opt=emit-llvm
--lto-emit-llvm 的別名
208. --plugin-opt=jobs=<value>
--thinlto-jobs= 的別名
209. --plugin-opt=lto-partitions=<value>
--lto-partitions 的別名
afl-ld-lto target.c --pack-dyn-relocs=none --package-metadata=123 --pcrel-optimize --pic-executable --pic-veneer --pie --plugin-opt=test --plugin-opt=cs-profile-generate --plugin-opt=cs-profile-path=output --plugin-opt=debug-pass-manager --plugin-opt=disable-verify --plugin-opt=dwo_dir=output --plugin-opt=emit-asm --plugin-opt=emit-llvm --plugin-opt=jobs=output --plugin-opt=lto-partitions=output
210. --plugin-opt=obj-path=<value>
--lto-obj-path= 的別名
211. --plugin-opt=opt-remarks-filename=<value>
--opt-remarks-filename 的別名
212. --plugin-opt=opt-remarks-format=<value>
--opt-remarks-format 的別名
213. --plugin-opt=opt-remarks-hotness-threshold=<value>
--opt-remarks-hotness-threshold 的別名
214. --plugin-opt=opt-remarks-passes=<value>
--opt-remarks-passes 的別名
215. --plugin-opt=opt-remarks-with-hotness
--opt-remarks-with_hotness 的別名
216. --plugin-opt=O<value>
--lto-O 的別名
217. --plugin-opt=sample-profile=<value>
--lto-sample-profile 的別名
218. --plugin-opt=save-temps
--save-temps 的別名
219. --plugin-opt=stats-file=<value>
將 LTO 統計信息寫入的文件名
220. --plugin-opt=thinlto-emit-imports-files
--thinlto-emit-imports-files 的別名
221. --plugin-opt=thinlto-index-only=<value>
--thinlto-index-only= 的別名
222. --plugin-opt=thinlto-index-only
--thinlto-index-only 的別名
223. --plugin-opt=thinlto-object-suffix-replace=<value>
--thinlto-object-suffix-replace= 的別名
224. --plugin-opt=thinlto-prefix-replace=<value>
--thinlto-prefix-replace= 的別名
225. --plugin=<value>
忽略此參數以兼容 GNU 鏈接器
226. --pop-state
恢復 --push-state 保存的狀態
227. --power10-stubs=<mode>
是否在 R_PPC64_REL24_NOTOC 和 TOC/NOTOC 互通的調用存根中使用 Power10 指令(yes(默認):使用;no:不使用)。“auto”目前與“yes”相同
228. --power10-stubs
--power10-stubs=auto 的別名
afl-ld-lto target.c --plugin-opt=obj-path --plugin-opt=opt-remarks-filename --plugin-opt=opt-remarks-format --plugin-opt=opt-remarks-hotness-threshold --plugin-opt=opt-remarks-passes --plugin-opt=opt-remarks-with-hotness --plugin-opt=O --plugin-opt=sample-profile --plugin-opt=save-temps --plugin-opt=stats-file --plugin-opt=thinlto-emit-imports-files --plugin-opt=thinlto-index-only --plugin-opt=thinlto-index-only --plugin-opt=thinlto-object-suffix-replace --plugin-opt=thinlto-prefix-replace --plugin=test --pop-state --power10-stubs=auto --power10-stubs
229. --print-archive-stats=<value>
將檔案使用情況統計信息寫入指定文件。打印每個檔案的成員數量和提取的成員數量。
230. --print-gc-sections
列出已移除的未使用部分。
231. --print-icf-sections
列出相同的折疊部分。
232. --print-map
將鏈接圖打印到標準輸出。
233. --print-memory-usage
報告目標內存使用情況。
234. --print-symbol-order=<value>
將 --call-graph-ordering-file 指定的符號順序打印到指定文件中。
235. --push-state
保存 --as-needed、-static 和 --whole-archive 的當前狀態。
236. -q
--emit-relocs 的別名。
afl-ld-lto target.c --print-archive-stats=test --print-gc-sections --print-icf-sections --print-map --print-memory-usage --print-symbol-order=test -q
237. --relax-gp
啟用全局指針放寬
238. --relax
如果支持,啟用特定目標的放寬(默認)
239. --relocatable
創建可重定位目標文件
240. --remap-inputs-file=<file>
每行包含“from-glob=to-file”。將匹配 <from-glob> 的輸入文件重新映射到 <to-file>
241. --remap-inputs=<from-glob>=<to-file>
將匹配 <from-glob> 的輸入文件重新映射到 <to-file>
242. --reproduce=<value>
寫入包含輸入和命令的 tar 文件以重現鏈接
243. --retain-symbols-file=<file>
僅保留文件中列出的符號
244. --rosegment
將只讀且不可執行的段放入其自己的段中(默認)
245. --rpath=<value>
為輸出添加 DT_RUNPATH
246. --rsp-quoting=[posix,windows]
響應文件的引用樣式
247. -R <value>
--rpath 的別名
248. -r
--relocatable 的別名
afl-ld-lto target.c --relax-gp --relax --relocatable --remap-inputs-file=test --remap-inputs=from-glob --reproduce=output --retain-symbols-file=output --rosegment --rpath=output --rsp-quoting=windows -R output -r
249. --save-temps=<value>
保存選定的 LTO 編譯中間結果
250. --save-temps
保存 LTO 編譯中間結果
251. --script=<value>
讀取鏈接器腳本
252. --section-start=<address>
設置段地址
253. --shared
構建共享對象
254. --shuffle-sections=<section-glob>=<seed>
使用給定的種子對匹配的段進行隨機排序,然后再將它們映射到輸出段。如果為 -1,則反轉段順序。如果為 0,則使用隨機種子
255. --soname=<value>
設置 DT_SONAME
256. --sort-section=<value>
指定使用鏈接器腳本時的段排序規則
257. --split-stack-adjust-size=<value>
指定當拆分堆棧函數調用非拆分堆棧函數時,調整堆棧大小
258. --start-group
為兼容 GNU 而忽略,除非您指定 --warn-backrefs
259. --start-lib
啟動對象分組,這些對象應被視為同一歸檔文件中的對象
260. --static
與 --Bstatic 同名
261. --strip-all
刪除所有符號。隱含 --strip-debug
262. --strip-debug
刪除調試信息
263. --symbol-ordering-file=<value>
布局段,使符號按照符號排序文件指定的順序排列
264. --sysroot=<value>
設置系統根目錄
265. -S
與 --strip-debug 同名
266. -s
與 --strip-all 同名
afl-ld-lto target.c --save-temps=test --script=test --section-start=127.0.0.1 --shared --shuffle-sections=12 --soname=test --sort-section=test --split-stack-adjust-size=test --start-group --start-lib --static --strip-all --strip-debug --symbol-ordering-file=test --sysroot=test -S -s
267. --target1-abs
將 R_ARM_TARGET1 解析為 R_ARM_ABS32(默認)
268. --target1-rel
將 R_ARM_TARGET1 解析為 R_ARM_REL32
269. --target2=<type>
將 R_ARM_TARGET2 解析為 <type>,其中 <type> 為 rel、abs 或 got-rel 之一
270. --Tbss=<value>
與 --section-start 相同,但以 .bss 為節名
271. --Tdata=<value>
與 --section-start 相同,但以 .data 為節名
272. --thinlto-cache-dir=<value>
ThinLTO 緩存對象文件目錄路徑
273. --thinlto-cache-policy=<value>
ThinLTO 緩存的修剪策略
274. --thinlto-jobs=<value>
ThinLTO 作業數量。默認為 --threads=
275. --thinlto-single-module=<value>
指定在 ThinLTO 模式下編譯的單個模塊,僅用于調試
276. --threads=<value>
線程數。“1”表示禁用多線程。默認情況下,使用所有可用的硬件線程
277. --time-trace-granularity=<value>
時間分析器跟蹤的最小時間粒度(以微秒為單位)
278. --time-trace=<file>
將時間跟蹤記錄到 <file>
279. --time-trace
將時間跟蹤記錄到輸出旁邊的文件中
280. --toc-optimize
(PowerPC64) 啟用目錄相關的優化(默認)
281. --trace-symbol=<value>
跟蹤對符號的引用
282. --trace
打印輸入文件的名稱
283. --Ttext=<value>
與 --section-start 相同,但以 .text 作為節名
284. -T <value>
--script 的別名
285. -t
--trace 的別名
afl-ld-lto target.c --target1-abs --target1-rel --target2=rel --Tbss=test --Tdata=test --thinlto-cache-dir=output --thinlto-cache-policy=output --thinlto-jobs=10 --thinlto-single-module=12 --threads=20 --time-trace-granularity=43 --time-trace=output --time-trace --toc-optimize --trace-symbol=output --trace --Ttext=text -T -t
286. --undefined-glob=<pattern>
鏈接時強制使用未定義符號
287. --undefined-version
允許在版本腳本中使用未使用的版本(默認禁用)
288. --undefined=<symbol>
鏈接時強制使用未定義符號
289. --unique
為每個孤立輸入段創建單獨的輸出段
290. --unresolved-symbols=<value>
確定如何處理未解析的符號
291. --use-android-relr-tags
使用 SHT_ANDROID_RELR / DT_ANDROID_RELR* 標簽代替 SHT_RELR / DT_RELR*
292. -u <value>
--undefined 的別名
293. --verbose
詳細模式
294. --version-script=<value>
讀取版本腳本
afl-ld-lto target.c --undefined-glob=test --undefined-version --undefined=test --unique --unresolved-symbols=test --use-android-relr-tags -u test --verbose --version-script=test
295. --version
顯示版本號并退出
afl-ld-lto --version
296. --vs-diagnostics
格式化診斷信息以兼容 Visual Studio
297. -V
-v 的別名
298. -v
顯示版本號
afl-ld-lto --vs-diagnostics -V -v
299. --warn-backrefs-exclude=<glob>
用于描述存檔(或 --start-lib 內的目標文件)的 glob,在 --warn-backrefs 中應忽略該存檔。
300. --warn-backrefs
警告提取存檔成員時出現的反向符號引用
301. --warn-common
警告重復的公共符號
302. --warn-ifunc-textrel
警告將 ifunc 符號與文本重定位一起使用時出現的警告
303. --warn-symbol-ordering
警告符號排序文件存在問題(默認)
304. --warn-unresolved-symbols
將未解析的符號報告為警告
305. --whole-archive
強制加載靜態庫中的所有成員
306. --why-extract=<value>
將提取存檔成員的原因打印到文件中
307. --wrap=<symbol>
將符號引用重定向到 __wrap_symbol,并將 __real_symbol 引用重定向到符號
308. -w
--no-warnings 的別名
309. -X
--discard-locals 的別名
310. -x
--discard-all 的別名
311. -y <value>
--trace-symbol 的別名
312. -z <option>
鏈接器選項擴展
afl-ld-lto target.c --warn-backrefs-exclude=test --warn-backrefs --warn-common --warn-ifunc-textrel --warn-symbol-ordering --warn-unresolved-symbols --whole-archive --why-extract=output --wrap=output -w -X -x -y output -z output