aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2010-12-28 16:52:21 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2010-12-28 16:52:21 +0900
commitd457addfc3ad1449cec8eabb2fcd1b4231ae82ea (patch)
tree0dade0285307ba1a0370abf9ad2824312800d9f6 /tccelf.c
parent0ae39f1957c92ca33e7ab158870b92be945eb595 (diff)
downloadtinycc-d457addfc3ad1449cec8eabb2fcd1b4231ae82ea.tar.gz
tinycc-d457addfc3ad1449cec8eabb2fcd1b4231ae82ea.tar.bz2
Fix for the previous commit.
R_X86_64_PLT32 for .so doesn't need DLL relocation.
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tccelf.c b/tccelf.c
index c0977a8..b454acf 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