Dual Symbols for C Constructors
The Itanium C ABI specifies that mangled names of constructors include information about their type and parameters. Accordingly, the two constructor entries observed in libraries stem from their different constructor types:
Dual Symbols and Multiple Definition Errors
Despite having dual entries, conflicting symbol definitions do not arise due to the use of the C1 and C2 suffixes. The ABI ensures that the mangled names are unique, providing compiler support for handling these two constructor types differently.
Additional Details
The above is the detailed content of Why Are There Two Symbols for C Constructors?. For more information, please follow other related articles on the PHP Chinese website!