History

Fix for the previous commit.

R_X86_64_PLT32 for .so doesn't need DLL relocation.

Shinichiro Hamaji committed 15 years ago

Commit d457add1 parent 0ae39f11 file · +3 −2Browse files

Unified · Split

tccelf.c+3−2
@@ -716,8 +716,6 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) · 715 unmodified lines
716716 break;
717717
718718 case R_X86_64_PC32:
719− case R_X86_64_PLT32: {
720− long long diff;
721719 if (s1->output_type == TCC_OUTPUT_DLL) {
722720 /* DLL relocation */
723721 esym_index = s1->symtab_to_dynsym[sym_index];
@@ -729,6 +727,9 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) · 5 unmodified lines
729727 break;
730728 }
731729 }
730+ /* fall through */
731+ case R_X86_64_PLT32: {
732+ long long diff;
732733 diff = (long long)val - addr;
733734 if (diff <= -2147483647 || diff > 2147483647) {
734735 #ifndef TCC_TARGET_PE