private void addByteSourceInfo(Program program, Address loc, StringBuilder sb) {

		AddressSourceInfo addressSourceInfo = program.getMemory().getAddressSourceInfo(loc);
		if (addressSourceInfo == null) {
			return;
		}
		if (addressSourceInfo.getFileName() == null) {
			return;
		}
		String filename =
			StringUtilities.trimMiddle(addressSourceInfo.getFileName(), MAX_FILENAME_SIZE);
		long fileOffset = addressSourceInfo.getFileOffset();
		String dataDescr = "Byte Source Offset";
		appendTableRow(sb, dataDescr, "File: " + filename, fileOffset);
	}
A hover service to show tool tip text for hovering over a program address in the listing.
The tool tip text shows relationships to key topological elements of the program relative to
the address -- offset from image base, offset from current memory block; if the address is
within the bounds of a function, the offset from function entry point; if the address is within
the bounds of defined data, the offset from the start of the data.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/hover/ProgramAddressRelationshipListingHover.java