aboutsummaryrefslogtreecommitdiff
path: root/x86_64-link.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-12-18 05:18:19 +0100
committerMichael Matz <matz@suse.de>2016-12-18 05:20:14 +0100
commit77d7ea04acb56f839031993c102366e30cad5c25 (patch)
tree0e31c78f0462ff78b43a5bcb488984fb3ed4d5e3 /x86_64-link.c
parentcd9514abc4f4d7d90acce108b98ea2af58a1b80a (diff)
downloadtinycc-77d7ea04acb56f839031993c102366e30cad5c25.tar.gz
tinycc-77d7ea04acb56f839031993c102366e30cad5c25.tar.bz2
Fix gawk miscompile
See testcase. Function pointer use was hosed when the destination function wasn't also called normally by the program.
Diffstat (limited to 'x86_64-link.c')
-rw-r--r--x86_64-link.c3
1 files changed, 3 insertions, 0 deletions
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: