Fixed order of whole-archive checking since GNU ld will succeed and ignore options