aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji _at_ gmail.com>2009-07-19 06:42:23 +0900
committergrischka <grischka>2009-08-24 13:30:03 +0200
commit5dadff3de553b0dae46cca233c751ed8b6853da4 (patch)
tree6bcd6792db49262514998895b6847ac0e0599948 /tccgen.c
parent3a1380120d8c952a34f6b5db0b3c42f794770f51 (diff)
downloadtinycc-5dadff3de553b0dae46cca233c751ed8b6853da4.tar.gz
tinycc-5dadff3de553b0dae46cca233c751ed8b6853da4.tar.bz2
x86-64: Fix stab debug information.
We need 32bit relocations for code and 64bit for debug info. Introduce a new macro R_DATA_PTR to distinguish the two usages.
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tccgen.c b/tccgen.c
index 99ec723..bb7c4e9 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -4346,7 +4346,7 @@ static void init_putv(CType *type, Section *sec, unsigned long c,
break;
default:
if (vtop->r & VT_SYM) {
- greloc(sec, vtop->sym, c, R_DATA_32);
+ greloc(sec, vtop->sym, c, R_DATA_PTR);
}
*(int *)ptr |= (vtop->c.i & bit_mask) << bit_pos;
break;
@@ -4796,7 +4796,7 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r,
if (tcc_state->do_bounds_check) {
unsigned long *bounds_ptr;
- greloc(bounds_section, sym, bounds_section->data_offset, R_DATA_32);
+ greloc(bounds_section, sym, bounds_section->data_offset, R_DATA_PTR);
/* then add global bound info */
bounds_ptr = section_ptr_add(bounds_section, 2 * sizeof(long));
bounds_ptr[0] = 0; /* relocated */