From 77d7ea04acb56f839031993c102366e30cad5c25 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 18 Dec 2016 05:18:19 +0100 Subject: Fix gawk miscompile See testcase. Function pointer use was hosed when the destination function wasn't also called normally by the program. --- x86_64-link.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'x86_64-link.c') diff --git a/x86_64-link.c b/x86_64-link.c index 602a8ef..27cad93 100644 --- a/x86_64-link.c +++ b/x86_64-link.c @@ -61,6 +61,9 @@ int gotplt_entry_type (int reloc_type) case R_X86_64_RELATIVE: return NO_GOTPLT_ENTRY; + /* The following relocs wouldn't normally need GOT or PLT + slots, but we need them for simplicity in the link + editor part. See our caller for comments. */ case R_X86_64_32: case R_X86_64_32S: case R_X86_64_64: -- cgit v1.3.1