This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC PATCH 01/11] x86-64, elf: make elf_machine_lazy_rel() ignore R_X86_64_NONE


This adds a check of R_X86_64_NONE to ignore it on lazy relocation to
elf_machine_lazy_rel().
LibOS may also do relocation and change the relocation entry to NONE.
So elf_machine_lazy_rel() may see R_X86_64_NONE in this code path in
addition to elf_machine_rela().

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
---
 sysdeps/x86_64/dl-machine.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 95a13b35b5..50db45c082 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -578,6 +578,8 @@ elf_machine_lazy_rel (struct link_map *map,
 	value = ((ElfW(Addr) (*) (void)) value) ();
       *reloc_addr = value;
     }
+  else if (__glibc_unlikely (r_type == R_X86_64_NONE))
+    return;
   else
     _dl_reloc_bad_type (map, r_type, 1);
 }
-- 
2.17.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]