From f924d0ca964bc6f45fb905bf587ae4ef44fb92c2 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sat, 12 Nov 2016 23:16:05 +0800 Subject: Improve put_got_entry doc and structure --- tcc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index ed0afaa..c7d6dd5 100644 --- a/tcc.h +++ b/tcc.h @@ -1325,6 +1325,9 @@ ST_FUNC void tccelf_new(TCCState *s); ST_FUNC void tccelf_delete(TCCState *s); ST_FUNC void tccelf_stab_new(TCCState *s); +/* return offset of 'ptr' from start of section 'sec' */ +#define OFFSET_FROM_SECTION_START(sec, ptr) ((size_t)ptr - (size_t)sec->data) + ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh_flags); ST_FUNC void section_realloc(Section *sec, unsigned long new_size); ST_FUNC void *section_ptr_add(Section *sec, addr_t size); -- cgit v1.3.1