A minced oath for "Lord have mercy".
A mild oath expressing surprise, disbelief or annoyance. It is stereotypically regarded as being uttered by pirates.