Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / vdso / vdso2c.h
index f42e2ddc663da6777e8ced3e0f3632476506e119..11b65d4f94140d3523484c714a3735e6d2f718ed 100644 (file)
@@ -93,6 +93,9 @@ static void BITSFUNC(copy_section)(struct BITSFUNC(fake_sections) *out,
        uint64_t flags = GET_LE(&in->sh_flags);
 
        bool copy = flags & SHF_ALLOC &&
+               (GET_LE(&in->sh_size) ||
+                (GET_LE(&in->sh_type) != SHT_RELA &&
+                 GET_LE(&in->sh_type) != SHT_REL)) &&
                strcmp(name, ".altinstructions") &&
                strcmp(name, ".altinstr_replacement");
 
@@ -164,7 +167,7 @@ static void BITSFUNC(go)(void *addr, size_t len,
        for (i = 0; dyn + i < dyn_end &&
                     GET_LE(&dyn[i].d_tag) != DT_NULL; i++) {
                typeof(dyn[i].d_tag) tag = GET_LE(&dyn[i].d_tag);
-               if (tag == DT_REL || tag == DT_RELSZ ||
+               if (tag == DT_REL || tag == DT_RELSZ || tag == DT_RELA ||
                    tag == DT_RELENT || tag == DT_TEXTREL)
                        fail("vdso image contains dynamic relocations\n");
        }