aboutsummaryrefslogtreecommitdiff
path: root/arm64-link.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2016-12-05 21:34:00 +0000
committerThomas Preud'homme <robotux@celest.fr>2016-12-05 21:34:30 +0000
commit2372639e9d3dbca16b48480f5a032254ce46fbab (patch)
tree378dc8285ea58c6c45c1420470bd1070c7178d56 /arm64-link.c
parent3811794048e483c81ab0aa559e76bc13e26e58f3 (diff)
downloadtinycc-2372639e9d3dbca16b48480f5a032254ce46fbab.tar.gz
tinycc-2372639e9d3dbca16b48480f5a032254ce46fbab.tar.bz2
Fix set but not used error in arm64-link.c
Diffstat (limited to 'arm64-link.c')
-rw-r--r--arm64-link.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arm64-link.c b/arm64-link.c
index c66029e..9e5a873 100644
--- a/arm64-link.c
+++ b/arm64-link.c
@@ -40,11 +40,10 @@ void relocate_init(Section *sr) {}
void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, addr_t val)
{
- ElfW(Sym) *sym;
- int sym_index;
-
- sym_index = ELFW(R_SYM)(rel->r_info);
- sym = &((ElfW(Sym) *)symtab_section->data)[sym_index];
+ int sym_index = ELFW(R_SYM)(rel->r_info);
+#ifdef DEBUG_RELOC
+ ElfW(Sym) *sym = &((ElfW(Sym) *)symtab_section->data)[sym_index];
+#endif
switch(type) {
case R_AARCH64_ABS64: