static <T extends ElfInfoItem> ItemWithAddress<T> readItemFromSection(Program program,
			MemoryBlock memBlock, ReaderFunc<T> readFunc) {
		if (memBlock != null) {
			try (ByteProvider bp =
				MemoryByteProvider.createMemoryBlockByteProvider(program.getMemory(), memBlock)) {
				BinaryReader br = new BinaryReader(bp, !program.getMemory().isBigEndian());

				T item = readFunc.read(br, program);
				return item != null ? new ItemWithAddress<>(item, memBlock.getStart()) : null;
			}
			catch (IOException e) {
				Msg.warn(ElfInfoItem.class,
					"Unable to read Elf item in section: %s".formatted(memBlock.getName()), e);
			}
		}
		return null;
	}
Helper method to read an item from a program's memory section.

@param <T> type of the item that will be read
@param program {@link Program} to read from
@param sectionName name of memory section that contains the item
@param readFunc {@link ReaderFunc} that will deserialize an instance of the item
@return a wrapped instance of the item, or null if the memory section does not exist
or there was an error while reading the item from the section
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/info/ElfInfoItem.java