aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>2015-02-21 21:29:03 +0000
committerEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>2015-02-21 21:29:03 +0000
commit738606dbd5608cb2ed6789beecea40712809c397 (patch)
tree5905c3fa381607f962f2cc75d68c280ab5d03eba /tcc.h
parent86c850fc58a70ff4b77c37d91e33ce6c812b04c4 (diff)
downloadtinycc-738606dbd5608cb2ed6789beecea40712809c397.tar.gz
tinycc-738606dbd5608cb2ed6789beecea40712809c397.tar.bz2
Use RELA relocations properly for R_DATA_PTR on x86_64.
libtcc.c: Add greloca, a generalisation of greloc that takes an addend. tcc.h: Add greloca and put_elf_reloca. tccelf.c: Add put_elf_reloca, a generalisation of put_elf_reloc. tccgen.c: On x86_64, use greloca instead of greloc in init_putv.
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index 3f7d43b..aaf5be0 100644
--- a/tcc.h
+++ b/tcc.h
@@ -1074,6 +1074,7 @@ ST_FUNC Section *find_section(TCCState *s1, const char *name);
ST_FUNC void put_extern_sym2(Sym *sym, Section *section, addr_t value, unsigned long size, int can_add_underscore);
ST_FUNC void put_extern_sym(Sym *sym, Section *section, addr_t value, unsigned long size);
ST_FUNC void greloc(Section *s, Sym *sym, unsigned long offset, int type);
+ST_FUNC void greloca(Section *s, Sym *sym, unsigned long offset, int type, unsigned long addend);
ST_INLN void sym_free(Sym *sym);
ST_FUNC Sym *sym_push2(Sym **ps, int v, int t, long c);
@@ -1261,6 +1262,7 @@ ST_FUNC int put_elf_sym(Section *s, addr_t value, unsigned long size, int info,
ST_FUNC int add_elf_sym(Section *s, addr_t value, unsigned long size, int info, int other, int sh_num, const char *name);
ST_FUNC int find_elf_sym(Section *s, const char *name);
ST_FUNC void put_elf_reloc(Section *symtab, Section *s, unsigned long offset, int type, int symbol);
+ST_FUNC void put_elf_reloca(Section *symtab, Section *s, unsigned long offset, int type, int symbol, unsigned long addend);
ST_FUNC void put_stabs(const char *str, int type, int other, int desc, unsigned long value);
ST_FUNC void put_stabs_r(const char *str, int type, int other, int desc, unsigned long value, Section *sec, int sym_index);