aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Cypriani <mcy@lm7.fr>2014-09-07 11:29:38 -0400
committerMatteo Cypriani <mcy@lm7.fr>2014-09-07 12:04:53 -0400
commit63376d7712081c739a3e8dfe5fba396721bbe10b (patch)
tree1e71611d57471bfb0a48b7329d2c0351650826f8
parentb84cdf621416f5aac9d7275ece8ca17fe15f472d (diff)
downloadtinycc-63376d7712081c739a3e8dfe5fba396721bbe10b.tar.gz
tinycc-63376d7712081c739a3e8dfe5fba396721bbe10b.tar.bz2
tccelf: layout_sections: add missing param strsec
This fixes compilation on (k)FreeBSD.
-rw-r--r--tccelf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tccelf.c b/tccelf.c
index 2fbe692..02caa68 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. */