For cooperative amplify-and-forward (AF) relaying in spectrum-sharing wireless systems, secondary users share spectrum resources originally licensed to primary users to communicate with each other and, thus, the transmit power of secondary transmitters is strictly limited by the tolerable interference powers at primary receivers. Furthermore, the received signals at a relay and at a secondary receiver are inevitably interfered by the signals from primary transmitters. These co-channel interferences (CCIs) from concurrent primary transmission can significantly degrade the performance of secondary transmission. This paper studies the effect of CCIs on outage probability of the secondary link in a spectrum-sharing environment. In particular, in order to compensate the performance loss due to CCIs, the transmit powers of a secondary transmitter and its relaying node are respectively optimized with respect to both the tolerable interference powers at the primary receivers and the CCIs from the primary transmitters. Moreover, when multiple relays are available, the technique of opportunistic relay selection is exploited to further improve system performance with low implementation complexity. By analyzing lower and upper bounds on the outage probability of the secondary system, this study reveals that it is the tolerable interference powers at primary receivers that dominate the system performance, rather than the CCIs from primary transmitters. System designers will benefit from this result in planning and designing next-generation broadband spectrum-sharing systems.