aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-04-10 06:49:24 +0300
committerseyko <seyko2@gmail.com>2015-04-10 06:49:24 +0300
commit089ce6235c99638ad4542a57af4d09e2be0efc88 (patch)
tree7428f6c546e9e0d492737242247a6ac920ca1eb2 /tccelf.c
parent3c372b4c8aed2060ecff980a377a128e59c279b3 (diff)
downloadtinycc-089ce6235c99638ad4542a57af4d09e2be0efc88.tar.gz
tinycc-089ce6235c99638ad4542a57af4d09e2be0efc88.tar.bz2
output all sections if we produce an executable file
tcc w/o -g option generate an executable file which format is not recognized by binutils. It is like stripped one but binutils don't think so. Solution: generate not stripped file which can be correctly stripped by external utils. may be there is a need to handle a -s option and call a sstrip/strip program to do a job.
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tccelf.c b/tccelf.c
index 494bc0a..0adc3dc 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -2020,6 +2020,7 @@ static void alloc_sec_names(TCCState *s1, int file_type, Section *strsec)
s->sh_size = s->data_offset;
} else if (s1->do_debug ||
file_type == TCC_OUTPUT_OBJ ||
+ file_type == TCC_OUTPUT_EXE ||
(s->sh_flags & SHF_ALLOC) ||
i == (s1->nb_sections - 1)) {
/* we output all sections if debug or object file */