  By considering adiabatic contraction of the dark matter (DM) during star
formation, we estimate the amount of DM trapped in stars at their birth. If the
DM consists partly of primordial black holes (PBHs), they will be trapped
together with the rest of the DM and will be finally inherited by a star
compact remnant --- a white dwarf (WD) or a neutron star (NS), which they will
destroy in a short time. Observations of WDs and NSs thus impose constraints on
the abundance of PBH. We show that the best constraints come from WDs and NSs
in globular clusters which exclude the DM consisting entirely of PBH in the
mass range $10^{16}{\rm g} - 3\times 10^{22}{\rm g}$, with the strongest
constraint on the fraction $\Omega_{\rm PBH} /\Omega_{\rm DM}\lesssim 10^{-2}$
being in the range of PBH masses $10^{17}{\rm g} - 10^{18}$ g.
