flag (n.1) Look up flag at Dictionary.com
"cloth ensign," late 15c., now in all modern Germanic languages, but apparently first recorded in English, origin unknown, but likely connected with flag (v.) or else, like it, perhaps imitative. A less likely guess is that it is from the flag in flagstone on notion of being square and flat. U.S. Flag Day (1894) is in reference to the adopting of the Stars and Stripes by the Continental Congress on June 14, 1777.
flag (v.) Look up flag at Dictionary.com
1540s, "flap about loosely," perhaps a variant of Middle English flakken, flacken "to flap, flutter" (late 14c.), probably from Old Norse flakka "to flicker, flutter," perhaps imitative of something flapping lazily in the wind.

Sense of "go limp, droop" is first recorded 1610s. Meaning "to designate as someone who will not be served more liquor" is from 1980s, probably from use of flags to signal trains, etc., to halt, which led to the verb in this sense (1856, American English). Related: Flagged; flagging.
flag (n.2) Look up flag at Dictionary.com
"flat, split stone," c.1600, earlier "piece cut from turf or sod" (mid-15c.), from Old Norse flaga "stone slab," perhaps related to Old Norse flak (see flake (n.)).
flag (n.3) Look up flag at Dictionary.com
aquatic plant, late 14c., "reed, rush," perhaps from a Scandinavian source (compare Danish flæg "yellow iris") or Dutch flag; perhaps ultimately connected to flag (v.) on notion of "fluttering in the breeze."