flag (n.) Look up flag at Dictionary.com
"cloth ensign," c.1480, now in all modern Gmc. languages, but apparently first recorded in Eng., origin unknown, but likely connected with flag (v.) or else, like it, onomatopoeic. A less likely guess is that it is from the flag in flagstone (q.v.) on notion of being square and flat. Flagship is 1672, ship bearing an admiral's flag. 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 M.E. flakken, flacken "to flap, flutter," probably from O.N. flakka "to flicker, flutter," perhaps onomatopoeic of something flapping in the wind. Sense of "go limp, droop" is first recorded 1611. 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).