malformed .o file crashes/hangs linker

<rdar://problem/12501376>

--- src/ld/parsers/macho_relocatable_file.cpp
+++ src/ld/parsers/macho_relocatable_file.cpp
@@ -822,6 +822,8 @@ template <typename A>
 const uint8_t* Atom<A>::contentPointer() const
 {
 	const macho_section<P>* sct = this->sect().machoSection();
+	if ( this->_objAddress > sct->addr() + sct->size() )
+		throwf("malformed .o file, symbol has address 0x%0llX which is outside range of its section", (uint64_t)this->_objAddress);
 	uint32_t fileOffset = sct->offset() - sct->addr() + this->_objAddress;
 	return this->sect().file().fileContent()+fileOffset;
 }
