[LLD] [COFF] Don't preserve unnecessary __imp_ prefixed symbols (#72989)
This redoes the fix from 3ab6209a differently, without the unwanted effect of preserving unnecessary `__imp_` prefixed symbols. If the referencing object is a regular object, the `__imp_` symbol will have `isUsedInRegularObj` set on it from that already. If the referencing object is an LTO object, we set `isUsedInRegularObj` for any symbol starting with `__imp_`. If the object file defining the `__imp_` symbol is a regular object, the `isUsedInRegularObj` flag has no effect. If it is an LTO object, it causes the symbol to be preserved.
Loading
Please sign in to comment