static void markupErrorOrWarning(Program program, String mainMsg, String tailMsg,
			Address relocationAddress, String relocTypeDetail, int symbolIndex, String symbolName,
			String bookmarkType, MessageLog log) {
		tailMsg = StringUtils.isEmpty(tailMsg) ? "" : (" - " + tailMsg);
		symbolName = StringUtils.isEmpty(symbolName) ? ElfSymbol.FORMATTED_NO_NAME : symbolName;
		String symbolIndexStr =
			symbolIndex < 0 ? "" : (" (0x" + Integer.toHexString(symbolIndex) + ")");
		if (log != null) {
			log.appendMsg(mainMsg + ": " + relocTypeDetail + " at " + relocationAddress +
				" (Symbol = " + symbolName + ")" + tailMsg);
		}
		BookmarkManager bookmarkManager = program.getBookmarkManager();
		bookmarkManager.setBookmark(relocationAddress, bookmarkType, "Relocation", mainMsg + ": " +
			relocTypeDetail + " Symbol = " + symbolName + symbolIndexStr + tailMsg);
	}
Generate error or warning log entry and bookmark at relocationAddress indicating a
relocation failure.

@param program program
@param mainMsg relocation error message (required)
@param tailMsg relocation error cause (optional, may be null)
@param relocationAddress relocation address to be bookmarked
@param relocTypeDetail relocation type detail
@param symbolIndex associated symbol index within symbol table (-1 to ignore)
@param symbolName associated symbol name
@param bookmarkType bookmark type: ({@link BookmarkType#ERROR} or ({@link BookmarkType#WARNING}
@param log import log or null if no logging required
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/relocation/ElfRelocationHandler.java