They just modified the program file header after assembling the program.
GEMDOS will not load the entire *.PRG file into mem, but just the number of bytes that are specified for the TEXT and DATA segments in the program header (+ the relocation table, if there is one).
I have toyed with the idea of using this method for my patches - it's nice to have just one single file for all the data + loader code. However, I believe this may not be compatible with newer GEMDOS versions, or Mint etc.
Haven't checked this yet, though...