this is about the amount -Wl,--gc-sections can help me to eliminate

This commit is contained in:
tg 2011-04-22 12:21:55 +00:00
parent d72669c66b
commit 45cd3a340b
3 changed files with 4 additions and 46 deletions

View File

@ -26,7 +26,7 @@
#include <sys/file.h>
#endif
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.108 2011/03/07 20:30:38 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.109 2011/04/22 12:21:53 tg Exp $");
/*-
* MirOS: This is the default mapping type, and need not be specified.
@ -526,26 +526,6 @@ findhist(int start, int fwd, const char *str, int anchored)
return (-1);
}
int
findhistrel(const char *str)
{
int maxhist = histptr - history;
int start = maxhist - 1;
int rec;
getn(str, &rec);
if (rec == 0)
return (-1);
if (rec > 0) {
if (rec > maxhist)
return (-1);
return (rec - 1);
}
if (rec > maxhist)
return (-1);
return (start + rec + 1);
}
/*
* set history
* this means reallocating the dataspace

21
jobs.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.77 2011/03/13 01:20:20 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.78 2011/04/22 12:21:54 tg Exp $");
#if HAVE_KILLPG
#define mksh_killpg killpg
@ -861,25 +861,6 @@ j_stopped_running(void)
return (0);
}
int
j_njobs(void)
{
Job *j;
int nj = 0;
#ifndef MKSH_NOPROSPECTOFWORK
sigset_t omask;
sigprocmask(SIG_BLOCK, &sm_sigchld, &omask);
#endif
for (j = job_list; j; j = j->next)
nj++;
#ifndef MKSH_NOPROSPECTOFWORK
sigprocmask(SIG_SETMASK, &omask, NULL);
#endif
return (nj);
}
/* list jobs for jobs built-in */
int

7
sh.h
View File

@ -151,7 +151,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.464 2011/04/22 12:15:40 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.465 2011/04/22 12:21:55 tg Exp $");
#endif
#define MKSH_VERSION "R39 2011/04/17"
@ -840,9 +840,8 @@ EXTERN sigset_t sm_default, sm_sigchld;
EXTERN const char *builtin_argv0;
EXTERN Tflag builtin_flag; /* flags of called builtin (SPEC_BI, etc.) */
/* current working directory, and size of memory allocated for same */
/* current working directory */
EXTERN char *current_wd;
EXTERN size_t current_wd_size;
/* Minimum required space to work with on a line - if the prompt leaves less
* space than this on a line, the prompt is truncated.
@ -1583,7 +1582,6 @@ void sethistfile(const char *);
char **histpos(void);
int histnum(int);
int findhist(int, int, const char *, int);
int findhistrel(const char *);
char **hist_get_newest(bool);
void inittraps(void);
void alarm_init(void);
@ -1616,7 +1614,6 @@ int j_kill(const char *, int);
int j_resume(const char *, int);
#endif
int j_jobs(const char *, int, int);
int j_njobs(void);
void j_notify(void);
pid_t j_async(void);
int j_stopped_running(void);