The existence of small surface discontinuities beneath a turbulent boundary layer plays a significant role in generating enhanced wall-pressure fluctuations and acoustic radiation. This study investigates numerically the aeroacoustics of low-Mach-number flows over small gaps and forward-facing steps using large-eddy simulation and Lighthill's aeroacoustic theory. The Lighthill's equation is solved using an approximate tailored Green's function for acoustically compact gaps and steps, and a boundary-element method to evaluate the effects of gap/step non-compactness and free-stream convection. The objectives of this study are to elucidate the acoustic source mechanisms and the effects of flow and geometric parameters including the step/gap size, shape and orientation. In the gap flows considered, it is found that the maximum surface pressure fluctuations, which increase with the gap width and trailing-edge height, occur at the trailing edge of the gap or near the reattachment point if there is separation from the trailing edge. The downstream recovery towards an equilibrium boundary layer is significantly faster compared to the boundary layers perturbed by a single forward step, and the recovery distance scales with the reattachment length for gaps with trailing-edge separation. The radiated sound field is dominated by the forward-facing step in the gap if it is exposed to oncoming turbulence. A mixed scaling using both backward- and forward-step heights as length scales has been found to collapse the sound pressure spectra for wide gaps with different forward step heights. For narrow and symmetric gaps, destructive interference of the sound from leading and trailing edges causes a significant decline in the low-frequency content. The effects of gap acoustic non-compactness and free-stream convection are found to be negligible at the typical hydroacoustic Mach number of 0.01, but become significant at Mach numbers as low as 0.1 and moderately high frequencies. Flow over forward-facing steps is considered to investigate the effects of step orientation and corner rounding. For swept steps, it is found that the sweep independence hypothesis holds for mean flow quantities for sweep angles up to 45?, and for fluctuating quantities including surface pressure fluctuations and Reynolds stresses for sweep angles up to 30?. The sound pressure spectra also exhibit approximate sweep independence for sweep angles up to 30?. Rouding the step upper corner is shown to cause reduced flow separation on the upper surface, increased level of peak surface pressure fluctuations and faster downstream relaxation to an equilibrium turbulent boundary layer. Step rounding also reduces the sound spectral level significantly due largely to reduced surface diffraction effect, and the reduction increases with increasing rounding radius and frequency.