private Address getGcWriteBarrierFlagAddr() {
			Symbol writeBarrierSym = goBinary.getGoSymbol("runtime.writeBarrier");
			if (writeBarrierSym != null) {
				return writeBarrierSym.getAddress();
			}

			// for each runtime.gcWriteBarrier*() func
			//   for each call ref to wb func
			//     iterate refs to func backwards starting at callsite (max 50'ish bytes)
			//     looking for data ref to global uninit addr
			//     followed by conditional jmp
			Map<Address, Integer> candidateFlagAddrs = new HashMap<>();

			for (Address wbFunc : getGcWriteBarrierFuncAddrs()) {
				for (Reference callSiteRef : refMgr.getReferencesTo(wbFunc)) {
					if (callSiteRef.getReferenceType().isCall()) {
						getGcWriteBarrierFlagAddrGuesses(callSiteRef.getFromAddress(),
							candidateFlagAddrs);
					}
				}
			}
			if (candidateFlagAddrs.size() > 1) {
				Msg.debug(this, "runtime.writeBarrier flag candidates: " + candidateFlagAddrs);
			}

			Optional<Entry<Address, Integer>> mostHits = candidateFlagAddrs.entrySet()
					.stream()
					.sorted((e1, e2) -> Integer.compare(e2.getValue(), e1.getValue()))
					.findFirst();

			return mostHits.isPresent() ? mostHits.get().getKey() : null;
		}
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