History

Revert "output all sections if we produce an executable file" -- Not a fix This reverts commit 089ce6235c99638ad4542a57af4d09e2be0efc88.

Revert "handle a -s option by executing sstrip/strip program" -- related, not a fix. This reverts commit 5cd4393a542ef4c64df7dcbb3fbe3a629666239d.

grischka committed 10 years ago

Commit 2d6aa651 parent 9c5bb163 files · +1 −14Browse files

Unified · Split

3 files
  1. libtcc.c +1 −2
  2. tcc.h +0 −1
  3. tccelf.c +0 −11
libtcc.c+1−2
@@ -2292,8 +2292,6 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 2291 unmodified lines
22922292 case TCC_OPTION_dumpversion:
22932293 printf ("%s\n", TCC_VERSION);
22942294 exit(0);
2295− case TCC_OPTION_s:
2296− s->do_strip = 1;
22972295 break;
22982296 case TCC_OPTION_traditional:
22992297 break;
@@ -2314,6 +2312,7 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 14 unmodified lines
23142312 break;
23152313 case TCC_OPTION_pedantic:
23162314 case TCC_OPTION_pipe:
2315+ case TCC_OPTION_s:
23172316 /* ignored */
23182317 break;
23192318 default:
tcc.h+0−1
@@ -622,7 +622,6 @@ struct TCCState { · 621 unmodified lines
622622
623623 /* compile with debug symbol (and use them if error during execution) */
624624 int do_debug;
625− int do_strip;
626625 #ifdef CONFIG_TCC_BCHECK
627626 /* compile with built-in memory and bounds checker */
628627 int do_bounds_check;
tccelf.c+0−11
@@ -2018,7 +2018,6 @@ static void alloc_sec_names(TCCState *s1, int file_type, Section *strsec) · 2017 unmodified lines
20182018 s->sh_size = s->data_offset;
20192019 } else if (s1->do_debug ||
20202020 file_type == TCC_OUTPUT_OBJ ||
2021− file_type == TCC_OUTPUT_EXE ||
20222021 (s->sh_flags & SHF_ALLOC) ||
20232022 i == (s1->nb_sections - 1)) {
20242023 /* we output all sections if debug or object file */
@@ -2688,16 +2687,6 @@ static int elf_output_file(TCCState *s1, const char *filename) · 663 unmodified lines
26882687
26892688 /* Create the ELF file with name 'filename' */
26902689 ret = tcc_write_elf_file(s1, filename, phnum, phdr, file_offset, sec_order);
2691− if (s1->do_strip) {
2692− int rc;
2693− const char *strip_cmd = "sstrip "; // super strip utility from ELFkickers
2694− const char *null_dev = " 2> /dev/null";
2695− char buf[1050];
2696− snprintf(buf, sizeof(buf), "%s%s%s", strip_cmd, filename, null_dev);
2697− rc = system(buf);
2698− if (rc)
2699− system(buf+1); // call a strip utility from binutils
2700− }
27012690 the_end:
27022691 tcc_free(s1->symtab_to_dynsym);
27032692 tcc_free(sec_order);

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