History

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

Detlef Riekenberg committed 4 years ago

Commit bc12ab01 parent 2647dc03 files · +6 −1Browse files

Unified · Split

3 files
  1. libtcc.c +4 −0
  2. tcc.c +1 −1
  3. tcc.h +1 −0
libtcc.c+4−0
@@ -844,6 +844,7 @@ LIBTCCAPI void tcc_delete(TCCState *s1) · 843 unmodified lines
844 tcc_free(s1->elf_entryname);844 tcc_free(s1->elf_entryname);
845 tcc_free(s1->init_symbol);845 tcc_free(s1->init_symbol);
846 tcc_free(s1->fini_symbol);846 tcc_free(s1->fini_symbol);
847 tcc_free(s1->mapfile);
847 tcc_free(s1->outfile);848 tcc_free(s1->outfile);
848 tcc_free(s1->deps_outfile);849 tcc_free(s1->deps_outfile);
849 dynarray_reset(&s1->files, &s1->nb_files);850 dynarray_reset(&s1->files, &s1->nb_files);
@@ -1395,6 +1396,9 @@ static int tcc_set_linker(TCCState *s, const char *option) · 545 unmodified lines
1395 } else if (link_option(option, "init=", &p)) {1396 } else if (link_option(option, "init=", &p)) {
1396 copy_linker_arg(&s->init_symbol, p, 0);1397 copy_linker_arg(&s->init_symbol, p, 0);
1397 ignoring = 1;1398 ignoring = 1;
1399 } else if (link_option(option, "Map=", &p)) {
1400 copy_linker_arg(&s->mapfile, p, 0);
1401 ignoring = 1;
1398 } else if (link_option(option, "oformat=", &p)) {1402 } else if (link_option(option, "oformat=", &p)) {
1399#if defined(TCC_TARGET_PE)1403#if defined(TCC_TARGET_PE)
1400 if (strstart("pe-", &p)) {1404 if (strstart("pe-", &p)) {
tcc.c+1−1
@@ -144,7 +144,7 @@ static const char help2[] = · 143 unmodified lines
144 " -soname= set DT_SONAME elf tag\n"144 " -soname= set DT_SONAME elf tag\n"
145 " -Bsymbolic set DT_SYMBOLIC elf tag\n"145 " -Bsymbolic set DT_SYMBOLIC elf tag\n"
146 " -oformat=[elf32/64-* binary] set executable output format\n"146 " -oformat=[elf32/64-* binary] set executable output format\n"
147 " -init= -fini= -as-needed -O (ignored)\n"147 " -init= -fini= -Map= -as-needed -O (ignored)\n"
148 "Predefined macros:\n"148 "Predefined macros:\n"
149 " tcc -E -dM - < /dev/null\n"149 " tcc -E -dM - < /dev/null\n"
150#endif150#endif
tcc.h+1−0
@@ -828,6 +828,7 @@ struct TCCState { · 827 unmodified lines
828 char *elf_entryname; /* "_start" unless set */828 char *elf_entryname; /* "_start" unless set */
829 char *init_symbol; /* symbols to call at load-time (not used currently) */829 char *init_symbol; /* symbols to call at load-time (not used currently) */
830 char *fini_symbol; /* symbols to call at unload-time (not used currently) */830 char *fini_symbol; /* symbols to call at unload-time (not used currently) */
831 char *mapfile; /* create a mapfile (not used currently) */
831 832
832 /* output type, see TCC_OUTPUT_XXX */833 /* output type, see TCC_OUTPUT_XXX */
833 int output_type;834 int output_type;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t