mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-12 09:00:09 +08:00
Accept -Wl,Map=filename.map
The parameter is stored in tccstate, but nothing more. Used by multiple software packages. Current tested example is OpenWatcom-v2 -- bye bye ... Detlef
This commit is contained in:
parent
2647dc063d
commit
bc12ab02c0
4
libtcc.c
4
libtcc.c
@ -844,6 +844,7 @@ LIBTCCAPI void tcc_delete(TCCState *s1)
|
||||
tcc_free(s1->elf_entryname);
|
||||
tcc_free(s1->init_symbol);
|
||||
tcc_free(s1->fini_symbol);
|
||||
tcc_free(s1->mapfile);
|
||||
tcc_free(s1->outfile);
|
||||
tcc_free(s1->deps_outfile);
|
||||
dynarray_reset(&s1->files, &s1->nb_files);
|
||||
@ -1395,6 +1396,9 @@ static int tcc_set_linker(TCCState *s, const char *option)
|
||||
} else if (link_option(option, "init=", &p)) {
|
||||
copy_linker_arg(&s->init_symbol, p, 0);
|
||||
ignoring = 1;
|
||||
} else if (link_option(option, "Map=", &p)) {
|
||||
copy_linker_arg(&s->mapfile, p, 0);
|
||||
ignoring = 1;
|
||||
} else if (link_option(option, "oformat=", &p)) {
|
||||
#if defined(TCC_TARGET_PE)
|
||||
if (strstart("pe-", &p)) {
|
||||
|
2
tcc.c
2
tcc.c
@ -144,7 +144,7 @@ static const char help2[] =
|
||||
" -soname= set DT_SONAME elf tag\n"
|
||||
" -Bsymbolic set DT_SYMBOLIC elf tag\n"
|
||||
" -oformat=[elf32/64-* binary] set executable output format\n"
|
||||
" -init= -fini= -as-needed -O (ignored)\n"
|
||||
" -init= -fini= -Map= -as-needed -O (ignored)\n"
|
||||
"Predefined macros:\n"
|
||||
" tcc -E -dM - < /dev/null\n"
|
||||
#endif
|
||||
|
1
tcc.h
1
tcc.h
@ -828,6 +828,7 @@ struct TCCState {
|
||||
char *elf_entryname; /* "_start" unless set */
|
||||
char *init_symbol; /* symbols to call at load-time (not used currently) */
|
||||
char *fini_symbol; /* symbols to call at unload-time (not used currently) */
|
||||
char *mapfile; /* create a mapfile (not used currently) */
|
||||
|
||||
/* output type, see TCC_OUTPUT_XXX */
|
||||
int output_type;
|
||||
|
Loading…
Reference in New Issue
Block a user