当前位置: 首页 > news >正文

aflplusplus:开源的模糊测试工具!全参数详细教程!Kali Linux教程!(三)

使用

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

由于篇幅有限,请看下一章教程!​​​​​​​

相关文章:

  • C++开源协程库async_simple有栈协程源码分析
  • Python 函数
  • linux驱动开发(9)- 信号量
  • 了解Redis的使用
  • 如何给Hexo-butterfly主题博客在复制时添加版权声明
  • Hive SQL:一小时快速入门指南
  • 读取配置文件到Settings对象的完整实现
  • 【AS32系列MCU调试教程】驱动开发:AS32驱动库的集成与应用实例
  • 拓展:###单向循环链表###
  • comfyui插件和comfyui mac安装
  • 设备被看门狗重置问题
  • RHCE 练习四:编写脚本实现以下功能
  • web方向第一次考核内容
  • Linux免驱使用slcan,使用方法以Ubuntu为例
  • g++ a.cpp -o a ‘pkg-config --cflags --libs opencv4‘/usr/bin/ld: 找不到 没有那个文件或目录
  • [特殊字符] Next.js Turbo 模式不支持 @svgr/webpack 的原因与解决方案
  • Redis的list的底层原理
  • 后端通过nignx代理转发,提供接口供前端在防火墙外访问
  • Arduino入门教程​​​​​​​:4、打印字符到电脑
  • python中的模块化编程:日期模块、math算术模块、random模块
  • wordpress建站访问不了/百度秒收录蜘蛛池
  • 做饮品的网站/微商引流推广
  • 国内景观设计公司前十名/seo查询友情链接
  • 济南网站建设山东聚搜网咨询/专业做加盟推广的公司
  • 有哪些学校的网站做的好处/seo 公司
  • 2022年适合小学生的新闻/谷歌seo 外贸建站