llvm-project/llvm/test/tools/llvm-lto
Wael Yehia 9559bd1990 [LTO][Legacy] Add new API to check presence of ctor/dtor functions.
On AIX, the linker needs to check whether a given lto_module_t contains
any constructor/destructor functions, in order to implement the behavior
of the -bcdtors:all flag. See
https://www.ibm.com/docs/en/aix/7.2?topic=l-ld-command for the flag's
documentation.
In llvm IR, constructor (destructor) functions are added to a special
global array @llvm.global_ctors (@llvm.global_dtors).
However, because these two symbols are artificial, they are not visited
during the symbol traversal (using the
lto_module_get_[num_symbols|symbol_name|symbol_attribute] API).

This patch adds a new function to the libLTO interface that checks the
presence of one or both of these two symbols.

Reviewed By: steven_wu

Differential Revision: https://reviews.llvm.org/D106887
2021-07-28 12:41:56 +00:00
..
Inputs
aix.ll [PATCH] fix location of test case 2021-03-15 09:34:24 -04:00
error.ll [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
help.test [llvm][tools] Hide more unrelated LLVM tool options 2021-07-21 09:14:04 +02:00
ltomodule.ll [LTO][Legacy] Add new API to check presence of ctor/dtor functions. 2021-07-28 12:41:56 +00:00
thinlto.ll