Use virtual function instead of hand-written type dispatch.

OutputSectionBase already has virtual member functions.
This patch makes addSection() a virtual function to remove code
from Writer::createSections().

llvm-svn: 256436
3 files changed