@Override
		public boolean applyTo(Program obj, TaskMonitor monitor) {
			Memory memory = program.getMemory();

			Address flagAddr = getGcWriteBarrierFlagAddr();
			if (flagAddr == null) {
				Msg.warn(this, "Could not find runtime.writeBarrier, unable to fixup");
				return true;
			}
			MemoryBlock memBlk = memory.getBlock(flagAddr);
			if (!memBlk.isInitialized()) {
				// split the uninitialized memory block into 3 pieces (leading, 4 byte flag, trailing)
				try {
					memory.split(memBlk, flagAddr);
					memBlk = memory.getBlock(flagAddr);
					Address afterFlag = flagAddr.add(4 /* sizeof(bool + padding) */);
					memory.split(memBlk, afterFlag);
					memory.convertToInitialized(memBlk, (byte) 0);
					memBlk.setName(memBlk.getName().replaceFirst("\\.split$", ".writeBarrierFlag"));
					memBlk = memory.getBlock(afterFlag);
					memBlk.setName(memBlk.getName().replaceFirst("(\\.split)+$", ".part2"));
				}
				catch (MemoryBlockException | LockException | NotFoundException e) {
					Msg.error(this, "Failed to fixup runtime.writeBarrier flag", e);
				}
			}
			else {
				// this codepath probably shouldn't be possible, the runtime.writeBarrier value
				// typically will be in an uninit'd mem block
				try {
					memory.setBytes(flagAddr, new byte[4]);
				}
				catch (MemoryAccessException e) {
					Msg.error(this, "Failed to set runtime.writeBarrier flag bytes to 0");
				}
			}
			// mark the 4 bytes of the flag with a data type and set it to constant mutability.
			try {
				// this will overwrite any DWARF discovered struct (that encompasses the flag) 
				// that was placed here, which is necessary to allow the decompiler to determine
				// that the flag is a constant value.
				Data flagData = DataUtilities.createData(program, flagAddr,
					AbstractIntegerDataType.getUnsignedDataType(4, null), 4,
					ClearDataMode.CLEAR_ALL_CONFLICT_DATA);
				MutabilitySettingsDefinition.DEF.setChoice(flagData,
					MutabilitySettingsDefinition.CONSTANT);
				markupSession.labelAddress(flagAddr, "runtime.writeBarrier.discovered");
			}
			catch (CodeUnitInsertionException | IOException e) {
				Msg.error(this, "Failed to markup runtime.writeBarrier flag", e);
			}
			return true;
		}
A background command that runs later, it copies the function signature information from the
main entry point of the duff function to any unnamed functions that are within the footprint
of the main function.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/GolangSymbolAnalyzer.java