Fix bug where --icf=safe triggers segfault when linking ARM.
authorCary Coutant <ccoutant@gmail.com>
Sat, 14 Apr 2018 22:58:07 +0000 (15:58 -0700)
committerCary Coutant <ccoutant@gmail.com>
Sat, 14 Apr 2018 22:58:07 +0000 (15:58 -0700)
commitaae8280935aab812c3666d1c5c0ea099e96927cc
treedb7d76e601c10266dc6ffe8b3ac37293813059a2
parent702d167134149f420ea3bcbc194d63a2653a0c27
Fix bug where --icf=safe triggers segfault when linking ARM.

When checking a R_ARM_TARGET[12] relocation, we need a valid target
pointer, but the garbage collection code was passing a NULL instead.

gold/
PR gold/23046
* gc.h (gc_process_relocs): Pass target to
scan.global_reloc_may_be_function_pointer.
gold/ChangeLog
gold/gc.h