Would it stop functioning because Disjunction has removed its magic? Or would its spell immunity stop Disjunction from affecting it?
It’s not absolutely clear, but I’d say disjunction doesn’t work on (non-epic) golems.
Ultimately this is a GM’s call (I’ll explain exactly why later): there is precedent for golems not being affected by disjunction at all, but there is also a counter-argument for them being affected. I’ll go through the factors one by one, because I didn’t reach this conclusion for the reasons I thought I would.
Immunity to Magic doesn't grant immunity to disjunction.
Golems (except for the epic ones) are only immune to magic that can be stopped by spell resistance.
However, mage's disjunction does not allow spell resistance, so immunity to magic won't stop it.
Constructs are immune to many things, but disjunction is not on the list.
Constructs are immune to charms, compulsions, phantasms, patterns, and morale effects, as well as poison, sleep effects, paralysis, stunning, disease, death effects, and necromancy effects, critical hits, nonlethal damage, ability damage, ability drain, fatigue, exhaustion, or energy drain, and most effects that requires a Fortitude save.
Disjunction is not any of these things, so this doesn't stop it.
Disjunction doesn't target creatures.
Since the golem is a creature--it has all the things a creature wants or needs, mechanically: ability scores, hit points, defenses, attacks, and so forth--it is reasonable to say that disjunction doesn't impact a golem any more than the spell would kill a displacer beast.
But... golems are made with an item creation feat
Disjunction does target magic items. Golems are made using the item creation rules, and you need an item creation feat to make one. By that logic, disjunction would turn a golem into an expensive pile of fancy parts.
So it's a GM's call.
If golems are just creatures, then disjunction won't work on them.
If golems are also magic items, then disjunction can kill them.
But I'd say it doesn't work.
And as precedent, I cite the anti-magic field.
In an anti-magic field, magic items have their magical functioning suppressed as if dispelled, but golems work fine. I think that provides fine precedent for golems not being magic items, and thus not being affected by disjunction.
If you really want to keep some of the power of disjunction in this situation, I’d take the spell’s percent chance to unmake artifacts and make it work on golems too.
Golems aren’t deactivated by antimagic field or Dead Magic Zone. If the complete lack of magic doesn’t stop their animation, it doesn’t seem like a momentary (albeit powerful) disruption should either. Disjunction affects golems the same way it affects any other creature: it kills their spells and magic items. It does not affect the golem itself.