aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorgrischka <grischka>2011-07-14 19:23:04 +0200
committergrischka <grischka>2011-07-14 19:23:04 +0200
commitaa80e5b1ff9a0dedb5a41916716870345033ca30 (patch)
treeaadbbdfe6e5394c93cb6a75dbc352c584426ca25 /tcc.h
parentd483ab322f797972bb7e55624cd8c406a240a2ad (diff)
downloadtinycc-aa80e5b1ff9a0dedb5a41916716870345033ca30.tar.gz
tinycc-aa80e5b1ff9a0dedb5a41916716870345033ca30.tar.bz2
tccpe: cleanup ELFW() macros etc.
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index e1b27f2..3e577aa 100644
--- a/tcc.h
+++ b/tcc.h
@@ -1150,6 +1150,24 @@ ST_INLN void inp(void);
ST_FUNC int handle_eob(void);
#endif
+#ifdef TCC_TARGET_X86_64
+# define ELFCLASSW ELFCLASS64
+# define ElfW(type) Elf##64##_##type
+# define ELFW(type) ELF##64##_##type
+# define ElfW_Rel ElfW(Rela)
+# define SHT_RELX SHT_RELA
+# define REL_SECTION_FMT ".rela%s"
+/* XXX: DLL with PLT would only work with x86-64 for now */
+# define TCC_OUTPUT_DLL_WITH_PLT
+#else
+# define ELFCLASSW ELFCLASS32
+# define ElfW(type) Elf##32##_##type
+# define ELFW(type) ELF##32##_##type
+# define ElfW_Rel ElfW(Rel)
+# define SHT_RELX SHT_REL
+# define REL_SECTION_FMT ".rel%s"
+#endif
+
/* ------------ xxx-gen.c ------------ */
ST_FUNC void gsym_addr(int t, int a);