[llvm-objcopy] Use getNumberOfSymbols() instead of getRawNumberOfSymbols()
getRawNumberOfSymbols() assumes that a symbol table exists, which isn't always guaranteed, while getNumberOfSymbols() handles and tolerates objects without a symbol table. When there is a symbol table, both methods return the same value. Also add a test to ensure we don't regress in this regard. The test generates a basic COFF object with symbols and overrides the symbol table pointer with zeros to craft the input required to verify llvm-objcopy works as expected in this scenario.
Loading
Please sign in to comment