diff options
author | Cary Coutant <ccoutant@gmail.com> | 2018-04-14 15:58:07 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2018-04-14 15:58:07 -0700 |
commit | aae8280935aab812c3666d1c5c0ea099e96927cc (patch) | |
tree | db7d76e601c10266dc6ffe8b3ac37293813059a2 /gold/gc.h | |
parent | 702d167134149f420ea3bcbc194d63a2653a0c27 (diff) | |
download | gdb-aae8280935aab812c3666d1c5c0ea099e96927cc.zip gdb-aae8280935aab812c3666d1c5c0ea099e96927cc.tar.gz gdb-aae8280935aab812c3666d1c5c0ea099e96927cc.tar.bz2 |
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.
Diffstat (limited to 'gold/gc.h')
-rw-r--r-- | gold/gc.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -300,7 +300,7 @@ gc_process_relocs( && dst_obj != NULL && (!is_ordinary || scan.global_reloc_may_be_function_pointer( - symtab, NULL, NULL, src_obj, src_indx, NULL, reloc, + symtab, NULL, target, src_obj, src_indx, NULL, reloc, r_type, gsym))) symtab->icf()->set_section_has_function_pointers(dst_obj, dst_indx); |