We don't have any tests for GC of globals yet. I've therefore implemented -print-gc-sections for globals, and extended the tests to exercise it. I've also made it follow the --no-gc-sections flag, so the tests are consistent.
It does require the addition of a YAML file, since user-defined globals aren't accessible from LLC at the moment. It's better to have the test in there than not!
Non of this is needed if you don't include globals in the output of --print-gc-section.