[ARM] Avoid dereferencing null pointers

Alan Modra amodra@gmail.com
Wed Nov 20 22:02:00 GMT 2019


On Thu, Nov 21, 2019 at 08:19:03AM +1030, Alan Modra wrote:
> Using this should work:
> 
> 	  if (!is_arm_elf (input_bfd)
> 	      || elf_sym_hashes (input_bfd) == 0
> 	      || (elf_dyn_lib_class (input_bfd) & DYN_AS_NEEDED) != 0)
> 	    continue;

Actually, that might not be such a good idea.  An object without any
global symbols will have sym_hashes NULL too.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list