Fix gawk miscompile

See testcase.  Function pointer use was hosed when the destination
function wasn't also called normally by the program.
This commit is contained in:
Michael Matz
2016-12-18 05:18:19 +01:00
parent cd9514abc4
commit 77d7ea04ac
5 changed files with 56 additions and 27 deletions

View File

@ -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: