From d457addfc3ad1449cec8eabb2fcd1b4231ae82ea Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Tue, 28 Dec 2010 16:52:21 +0900 Subject: [PATCH] Fix for the previous commit. R_X86_64_PLT32 for .so doesn't need DLL relocation. --- tccelf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tccelf.c b/tccelf.c index c0977a88..b454acfe 100644 --- a/tccelf.c +++ b/tccelf.c @@ -716,8 +716,6 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) break; case R_X86_64_PC32: - case R_X86_64_PLT32: { - long long diff; if (s1->output_type == TCC_OUTPUT_DLL) { /* DLL relocation */ esym_index = s1->symtab_to_dynsym[sym_index]; @@ -729,6 +727,9 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) break; } } + /* fall through */ + case R_X86_64_PLT32: { + long long diff; diff = (long long)val - addr; if (diff <= -2147483647 || diff > 2147483647) { #ifndef TCC_TARGET_PE