diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-06 00:50:12 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-06 00:51:40 -0700 |
commit | ff38b4cc55dade4c9970cac2149a946d5dc0adc7 (patch) | |
tree | 6fbd0e348a7ea54ee89be918a589d5e630af7768 /bfd/elf64-x86-64.c | |
parent | f3180fa9ee8917fa9547cd5f79c822761f5d87a0 (diff) | |
download | gdb-ff38b4cc55dade4c9970cac2149a946d5dc0adc7.zip gdb-ff38b4cc55dade4c9970cac2149a946d5dc0adc7.tar.gz gdb-ff38b4cc55dade4c9970cac2149a946d5dc0adc7.tar.bz2 |
x86: Add VERIFY_COPY_RELOC
Add VERIFY_COPY_RELOC to verify that symbol supports copy relocation.
* elfxx-x86.h (VERIFY_COPY_RELOC): New.
* elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 1fb0a2d..c4cf7ae 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -4253,13 +4253,7 @@ do_glob_dat: asection *s; /* This symbol needs a copy reloc. Set it up. */ - - if (h->dynindx == -1 - || (h->root.type != bfd_link_hash_defined - && h->root.type != bfd_link_hash_defweak) - || htab->elf.srelbss == NULL - || htab->elf.sreldynrelro == NULL) - abort (); + VERIFY_COPY_RELOC (h, htab) rela.r_offset = (h->root.u.def.value + h->root.u.def.section->output_section->vma |