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
844844 tcc_free(s1->elf_entryname);
845845 tcc_free(s1->init_symbol);
846846 tcc_free(s1->fini_symbol);
847+ tcc_free(s1->mapfile);
847848 tcc_free(s1->outfile);
848849 tcc_free(s1->deps_outfile);
849850 dynarray_reset(&s1->files, &s1->nb_files);
@@ -1395,6 +1396,9 @@ static int tcc_set_linker(TCCState *s, const char *option) · 545 unmodified lines
13951396 } else if (link_option(option, "init=", &p)) {
13961397 copy_linker_arg(&s->init_symbol, p, 0);
13971398 ignoring = 1;
1399+ } else if (link_option(option, "Map=", &p)) {
1400+ copy_linker_arg(&s->mapfile, p, 0);
1401+ ignoring = 1;
13981402 } else if (link_option(option, "oformat=", &p)) {
13991403 #if defined(TCC_TARGET_PE)
14001404 if (strstart("pe-", &p)) {
tcc.c+1−1
@@ -144,7 +144,7 @@ static const char help2[] = · 143 unmodified lines
144144 " -soname= set DT_SONAME elf tag\n"
145145 " -Bsymbolic set DT_SYMBOLIC elf tag\n"
146146 " -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"
148148 "Predefined macros:\n"
149149 " tcc -E -dM - < /dev/null\n"
150150 #endif
tcc.h+1−0
@@ -828,6 +828,7 @@ struct TCCState { · 827 unmodified lines
828828 char *elf_entryname; /* "_start" unless set */
829829 char *init_symbol; /* symbols to call at load-time (not used currently) */
830830 char *fini_symbol; /* symbols to call at unload-time (not used currently) */
831+ char *mapfile; /* create a mapfile (not used currently) */
831832
832833 /* output type, see TCC_OUTPUT_XXX */
833834 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