Hi, On Fri, Sep 29, 2017 at 09:25:49PM -0400, Charles Lohr wrote: > I'm not sure how to tell the elf engine where functions begin+end, or how > to tell it about other important symbols. I don't see anything in the > existing *_gen.c files that would indicate how this is done.
See gen_function in tccgen.c. There is a put_extern_sym that associates the current position in the text section with the name of the function. The size of the function in the symbol is changed after gfunc_epilog has been called. > Additionally, since I'm not outputting any, the elf engine just crashes > because s1->got->reloc is null in "for_each_elem(s1->got->reloc, 0, rel, > ElfW_Rel)" is that a bug? Well, s1->got->reloc is allocated in the first call to put_elf_reloca. One could change the definition of for_each_elem to check if elem is NULL before each iteration. For your other questions I don't know the answer. Best regards, Daniel _______________________________________________ Tinycc-devel mailing list Tinycc-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tinycc-devel