R_X86_64_PLT32 for .so doesn't need DLL relocation.
Unified · Split
| @@ -716,8 +716,6 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) · 715 unmodified lines | |||
| 716 | break; | 716 | break; |
| 717 | 717 | ||
| 718 | case R_X86_64_PC32: | 718 | case R_X86_64_PC32: |
| 719 | case R_X86_64_PLT32: { | ||
| 720 | long long diff; | ||
| 721 | if (s1->output_type == TCC_OUTPUT_DLL) { | 719 | if (s1->output_type == TCC_OUTPUT_DLL) { |
| 722 | /* DLL relocation */ | 720 | /* DLL relocation */ |
| 723 | esym_index = s1->symtab_to_dynsym[sym_index]; | 721 | esym_index = s1->symtab_to_dynsym[sym_index]; |
| @@ -729,6 +727,9 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) · 5 unmodified lines | |||
| 729 | break; | 727 | break; |
| 730 | } | 728 | } |
| 731 | } | 729 | } |
| 730 | /* fall through */ | ||
| 731 | case R_X86_64_PLT32: { | ||
| 732 | long long diff; | ||
| 732 | diff = (long long)val - addr; | 733 | diff = (long long)val - addr; |
| 733 | if (diff <= -2147483647 || diff > 2147483647) { | 734 | if (diff <= -2147483647 || diff > 2147483647) { |
| 734 | #ifndef TCC_TARGET_PE | 735 | #ifndef TCC_TARGET_PE |