@Override
	protected DataTypeComponent[] getAllComponents(MemBuffer buf) {

		try {
			byte[] bytes = new byte[4];
			if (buf.getBytes(bytes, 0) != 4 || !"APS2".equals(new String(bytes))) {
				return null;
			}

			ByteProvider provider = new MemBufferByteProvider(buf);
			BinaryReader reader = new BinaryReader(provider, false);

			ArrayList<DataTypeComponent> list = new ArrayList<>();

			// assume APS2 format
			list.add(new ReadOnlyDataTypeComponent(StringDataType.dataType, this, 4, 0, 0, "format",
				null));
			reader.setPointerIndex(4);

			LEB128Info sleb128 = reader.readNext(LEB128Info::signed);
			long remainingRelocations = sleb128.asLong();
			list.add(getLEB128Component(sleb128, this, list.size(), "reloc_count", null));

			sleb128 = reader.readNext(LEB128Info::signed);
			long baseRelocOffset = sleb128.asLong();
			list.add(getLEB128Component(sleb128, this, list.size(), "reloc_baseOffset", null));

			int groupIndex = 0;
			long groupRelocOffset = baseRelocOffset;
			while (remainingRelocations > 0) {
				// NOTE: assumes 2-GByte MemBuffer limit
				int offset = (int) reader.getPointerIndex();

				long groupSize = reader.readNext(LEB128Info::signed).asLong();
				if (groupSize > remainingRelocations) {
					Msg.debug(this, "Group relocation count " + groupSize +
						" exceeded total count " + remainingRelocations);
					break;
				}

				AndroidElfRelocationGroup group =
					new AndroidElfRelocationGroup(dataMgr, groupRelocOffset);
				WrappedMemBuffer groupBuffer = new WrappedMemBuffer(buf, offset);
				int groupLength = group.getLength(groupBuffer, -1);
				DataTypeComponent dtc = new ReadOnlyDataTypeComponent(group, this, groupLength,
					list.size(), offset, "reloc_group_" + groupIndex++, null);
				list.add(dtc);

				groupRelocOffset = group.getLastRelocationOffset(groupBuffer);
				if (groupRelocOffset < 0) {
					break;
				}

				offset += groupLength;
				reader.setPointerIndex(offset);

				remainingRelocations -= groupSize;
			}

			DataTypeComponent[] comps = new DataTypeComponent[list.size()];
			return list.toArray(comps);
		}
		catch (IOException e) {
			return null;
		}
	}
<code>AndroidElfRelocationTableDataType</code> provides an implementation of 
an Android APS2 packed ELF relocation table.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/elf/AndroidElfRelocationTableDataType.java