From 63376d7712081c739a3e8dfe5fba396721bbe10b Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Sun, 7 Sep 2014 11:29:38 -0400 Subject: [PATCH] tccelf: layout_sections: add missing param strsec This fixes compilation on (k)FreeBSD. --- tccelf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tccelf.c b/tccelf.c index 2fbe692e..02caa68f 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1844,8 +1844,8 @@ struct dyn_inf { /* Assign sections to segments and decide how are sections laid out when loaded in memory. This function also fills corresponding program headers. */ static int layout_sections(TCCState *s1, ElfW(Phdr) *phdr, int phnum, - Section *interp, struct dyn_inf *dyninf, - int *sec_order) + Section *interp, Section* strsec, + struct dyn_inf *dyninf, int *sec_order) { int i, j, k, file_type, sh_order_index, file_offset; unsigned long s_align; @@ -2428,7 +2428,8 @@ static int elf_output_file(TCCState *s1, const char *filename) phdr = tcc_mallocz(phnum * sizeof(ElfW(Phdr))); /* compute section to program header mapping */ - file_offset = layout_sections(s1, phdr, phnum, interp, &dyninf, sec_order); + file_offset = layout_sections(s1, phdr, phnum, interp, strsec, &dyninf, + sec_order); /* Fill remaining program header and finalize relocation related to dynamic linking. */ -- 2.11.4.GIT