aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorAndrew Mulbrook <andrew262@gmail.com>2012-03-03 10:12:06 -0600
committerAndrew Mulbrook <andrew262@gmail.com>2012-03-03 10:12:06 -0600
commit5775911dadef7c10eee8ee44db41c6aeb6b11e07 (patch)
treea0a3262fc31cd601b098018fdc0ebb8e22a29516 /libtcc.c
parente343b1dfd47eb6514c836e2329ad0171a7226c4b (diff)
downloadtinycc-5775911dadef7c10eee8ee44db41c6aeb6b11e07.tar.gz
tinycc-5775911dadef7c10eee8ee44db41c6aeb6b11e07.tar.bz2
Revert "Multiple fixes for 64 bit sections"
This reverts commit d7a7c3769d0a1dcb8400258cd8adf78a8566de61.
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libtcc.c b/libtcc.c
index 5e497c9..9349348 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -425,7 +425,7 @@ ST_FUNC Section *find_section(TCCState *s1, const char *name)
/* update sym->c so that it points to an external symbol in section
'section' with value 'value' */
ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
- uplong value, unsigned long size,
+ unsigned long value, unsigned long size,
int can_add_underscore)
{
int sym_type, sym_bind, sh_num, info, other;
@@ -529,7 +529,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
}
ST_FUNC void put_extern_sym(Sym *sym, Section *section,
- uplong value, unsigned long size)
+ unsigned long value, unsigned long size)
{
put_extern_sym2(sym, section, value, size, 1);
}
@@ -1494,7 +1494,7 @@ PUB_FUNC const char * tcc_set_linker(TCCState *s, char *option, int multi)
if (s->warn_unsupported)
tcc_warning("ignoring -fini %s", p);
} else if (link_option(option, "image-base=", &p)) {
- s->text_addr = strtoull(p, &end, 16);
+ s->text_addr = strtoul(p, &end, 16);
s->has_text_addr = 1;
} else if (link_option(option, "init=", &p)) {
s->init_symbol = p;
@@ -1563,8 +1563,9 @@ PUB_FUNC const char * tcc_set_linker(TCCState *s, char *option, int multi)
#endif
} else if (link_option(option, "Ttext=", &p)) {
- s->text_addr = strtoull(p, &end, 16);
+ s->text_addr = strtoul(p, &end, 16);
s->has_text_addr = 1;
+
} else {
return option;
}