This allows us to catch some errors when there are relocations to such
discarded sections (e.g. PR41693). Updated comdat-discarded-error.s
checks we emit friendly error message.
For relocatable-eh-frame.s, ld.lld -r a.o a.o will now error
"STT_SECTION symbol should be defined" because the section .eh_frame
refers to is now an Undefined instead of a Defined.
So I have to change error() to warn() to retain the output.