On Tue, Feb 06, 2024 at 12:38:31PM +0000, Richard W.M. Jones wrote:
Not sure if it helps but it seems these source files implement the plugin:
https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/afl-g... https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/afl-g... https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/afl-g...
and this header:
https://github.com/AFLplusplus/AFLplusplus/blob/stable/instrumentation/afl-g...
At a glance it seems like it uses a lot of APIs ...
From quick skimming, I've only noticed set_decl_tls_model( decl, (flag_pic ? TLS_MODEL_INITIAL_EXEC : TLS_MODEL_LOCAL_EXEC)); where flag_pic can change any time some option is added or removed from *.opt files. But, it doesn't seem correct either, I think it should use set_decl_tls_model(decl, decl_default_tls_model(decl)); instead. Or call decl_default_tls_model(decl) and adjust the result depending on what it will return.
Jakub