]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elfxx-x86.h
x86: Add VERIFY_COPY_RELOC
[thirdparty/binutils-gdb.git] / bfd / elfxx-x86.h
index b81e1455398357809363f8b32d7f7259819cbc27..ca270ded0a582471449f301fb5dcf78899f72125 100644 (file)
       || (RELPLT) == NULL) \
     abort ();
 
+/* Verify that the symbol supports copy relocation.  */
+#define VERIFY_COPY_RELOC(H, HTAB) \
+  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 ();
+
 /* x86 ELF linker hash entry.  */
 
 struct elf_x86_link_hash_entry