static struct Symbol *lastsym;
/* common debugging routines */
-void debug32_typevalue(int32_t);
-void debug32_deflabel(char *, int32_t, int64_t, int, char *);
-void debug32_directive(const char *, const char *);
+static void debug32_typevalue(int32_t);
+static void debug32_deflabel(char *, int32_t, int64_t, int, char *);
+static void debug32_directive(const char *, const char *);
/* stabs debugging routines */
-void stabs32_init(struct ofmt *, void *, FILE *, efunc);
-void stabs32_linenum(const char *filename, int32_t linenumber, int32_t);
-void stabs32_output(int, void *);
-void stabs32_generate(void);
-void stabs32_cleanup(void);
+static void stabs32_init(struct ofmt *, void *, FILE *, efunc);
+static void stabs32_linenum(const char *filename, int32_t linenumber, int32_t);
+static void stabs32_output(int, void *);
+static void stabs32_generate(void);
+static void stabs32_cleanup(void);
/* dwarf debugging routines */
-void dwarf32_init(struct ofmt *, void *, FILE *, efunc);
-void dwarf32_linenum(const char *filename, int32_t linenumber, int32_t);
-void dwarf32_output(int, void *);
-void dwarf32_generate(void);
-void dwarf32_cleanup(void);
-void dwarf32_findfile(const char *);
-void dwarf32_findsect(const int);
-void saa_wleb128u(struct SAA *, int);
-void saa_wleb128s(struct SAA *, int);
+static void dwarf32_init(struct ofmt *, void *, FILE *, efunc);
+static void dwarf32_linenum(const char *filename, int32_t linenumber, int32_t);
+static void dwarf32_output(int, void *);
+static void dwarf32_generate(void);
+static void dwarf32_cleanup(void);
+static void dwarf32_findfile(const char *);
+static void dwarf32_findsect(const int);
/*
* Special NASM section numbers which are used to define ELF special
type = SHT_PROGBITS;
} else if (!nasm_stricmp(q, "nobits")) {
type = SHT_NOBITS;
- } else if (pass == 1) error(ERR_WARNING, "Unknown section attribute '%s' ignored on"
+ } else if (pass == 1) {
+ error(ERR_WARNING, "Unknown section attribute '%s' ignored on"
" declaration of section `%s'", q, name);
+ }
}
if (!strcmp(name, ".shstrtab") ||
};
/* again, the stabs debugging stuff (code) */
-void stabs32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
+static void stabs32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
{
(void)of;
(void)id;
(void)error;
}
-void stabs32_linenum(const char *filename, int32_t linenumber, int32_t segto)
+static void stabs32_linenum(const char *filename, int32_t linenumber,
+ int32_t segto)
{
(void)segto;
currentline = linenumber;
}
-void debug32_deflabel(char *name, int32_t segment, int64_t offset, int is_global,
+static void debug32_deflabel(char *name, int32_t segment, int64_t offset, int is_global,
char *special)
{
(void)name;
(void)special;
}
-void debug32_directive(const char *directive, const char *params)
+static void debug32_directive(const char *directive, const char *params)
{
(void)directive;
(void)params;
}
-void debug32_typevalue(int32_t type)
+static void debug32_typevalue(int32_t type)
{
int32_t stype, ssize;
switch (TYM_TYPE(type)) {
}
}
-void stabs32_output(int type, void *param)
+static void stabs32_output(int type, void *param)
{
struct symlininfo *s;
struct linelist *el;
/* for creating the .stab , .stabstr and .rel.stab sections in memory */
-void stabs32_generate(void)
+static void stabs32_generate(void)
{
int i, numfiles, strsize, numstabs = 0, currfile, mainfileindex;
uint8_t *sbuf, *ssbuf, *rbuf, *sptr, *rptr;
stabstrbuf = ssbuf;
}
-void stabs32_cleanup(void)
+static void stabs32_cleanup(void)
{
struct linelist *ptr, *del;
if (!stabslines)
/* dwarf routines */
-void dwarf32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
+static void dwarf32_init(struct ofmt *of, void *id, FILE * fp, efunc error)
{
(void)of;
(void)id;
ndebugs = 3; /* 3 debug symbols */
}
-void dwarf32_linenum(const char *filename, int32_t linenumber, int32_t segto)
+static void dwarf32_linenum(const char *filename, int32_t linenumber,
+ int32_t segto)
{
(void)segto;
dwarf32_findfile(filename);
}
/* called from elf_out with type == TY_DEBUGSYMLIN */
-void dwarf32_output(int type, void *param)
+static void dwarf32_output(int type, void *param)
{
int ln, aa, inx, maxln, soc;
struct symlininfo *s;
}
-void dwarf32_generate(void)
+static void dwarf32_generate(void)
{
uint8_t *pbuf;
int indx;
WRITELONG(pbuf,0); /* null ending offset */
}
-void dwarf32_cleanup(void)
+static void dwarf32_cleanup(void)
{
if (arangesbuf)
nasm_free(arangesbuf);
if (locbuf)
nasm_free(locbuf);
}
-void dwarf32_findfile(const char * fname)
+static void dwarf32_findfile(const char * fname)
{
int finx;
struct linelist *match;
}
}
/* */
-void dwarf32_findsect(const int index)
+static void dwarf32_findsect(const int index)
{
int sinx;
struct sectlist *match;
static struct Symbol *lastsym;
/* common debugging routines */
-void debug64_typevalue(int32_t);
-void debug64_deflabel(char *, int32_t, int64_t, int, char *);
-void debug64_directive(const char *, const char *);
+static void debug64_typevalue(int32_t);
+static void debug64_deflabel(char *, int32_t, int64_t, int, char *);
+static void debug64_directive(const char *, const char *);
/* stabs debugging routines */
-void stabs64_init(struct ofmt *, void *, FILE *, efunc);
-void stabs64_linenum(const char *filename, int32_t linenumber, int32_t);
-void stabs64_output(int, void *);
-void stabs64_generate(void);
-void stabs64_cleanup(void);
+static void stabs64_init(struct ofmt *, void *, FILE *, efunc);
+static void stabs64_linenum(const char *filename, int32_t linenumber, int32_t);
+static void stabs64_output(int, void *);
+static void stabs64_generate(void);
+static void stabs64_cleanup(void);
/* dwarf debugging routines */
-void dwarf64_init(struct ofmt *, void *, FILE *, efunc);
-void dwarf64_linenum(const char *filename, int32_t linenumber, int32_t);
-void dwarf64_output(int, void *);
-void dwarf64_generate(void);
-void dwarf64_cleanup(void);
-void dwarf64_findfile(const char *);
-void dwarf64_findsect(const int);
+static void dwarf64_init(struct ofmt *, void *, FILE *, efunc);
+static void dwarf64_linenum(const char *filename, int32_t linenumber, int32_t);
+static void dwarf64_output(int, void *);
+static void dwarf64_generate(void);
+static void dwarf64_cleanup(void);
+static void dwarf64_findfile(const char *);
+static void dwarf64_findsect(const int);
/*
* Special section numbers which are used to define ELF special
type = SHT_PROGBITS;
} else if (!nasm_stricmp(q, "nobits")) {
type = SHT_NOBITS;
- } else if (pass == 1) error(ERR_WARNING, "Unknown section attribute '%s' ignored on"
+ } else if (pass == 1) {
+ error(ERR_WARNING, "Unknown section attribute '%s' ignored on"
" declaration of section `%s'", q, name);
+ }
}
if (!strcmp(name, ".shstrtab") ||
};
/* common debugging routines */
-void debug64_deflabel(char *name, int32_t segment, int64_t offset, int is_global,
- char *special)
+static void debug64_deflabel(char *name, int32_t segment, int64_t offset,
+ int is_global, char *special)
{
(void)name;
(void)segment;
(void)special;
}
-void debug64_directive(const char *directive, const char *params)
+static void debug64_directive(const char *directive, const char *params)
{
(void)directive;
(void)params;
}
-void debug64_typevalue(int32_t type)
+static void debug64_typevalue(int32_t type)
{
int32_t stype, ssize;
switch (TYM_TYPE(type)) {
}
/* stabs debugging routines */
-void stabs64_init(struct ofmt *of, void *id, FILE * fp, efunc error)
+static void stabs64_init(struct ofmt *of, void *id, FILE * fp, efunc error)
{
(void)of;
(void)id;
}
-void stabs64_linenum(const char *filename, int32_t linenumber, int32_t segto)
+static void stabs64_linenum(const char *filename, int32_t linenumber, int32_t segto)
{
(void)segto;
if (!stabs_filename) {
}
-void stabs64_output(int type, void *param)
+static void stabs64_output(int type, void *param)
{
struct symlininfo *s;
struct linelist *el;
/* for creating the .stab , .stabstr and .rel.stab sections in memory */
-void stabs64_generate(void)
+static void stabs64_generate(void)
{
int i, numfiles, strsize, numstabs = 0, currfile, mainfileindex;
uint8_t *sbuf, *ssbuf, *rbuf, *sptr, *rptr;
stabstrbuf = ssbuf;
}
-void stabs64_cleanup(void)
+static void stabs64_cleanup(void)
{
struct linelist *ptr, *del;
if (!stabslines)
nasm_free(stabstrbuf);
}
/* dwarf routines */
-void dwarf64_init(struct ofmt *of, void *id, FILE * fp, efunc error)
+static void dwarf64_init(struct ofmt *of, void *id, FILE * fp, efunc error)
{
(void)of;
(void)id;
ndebugs = 3; /* 3 debug symbols */
}
-void dwarf64_linenum(const char *filename, int32_t linenumber, int32_t segto)
+static void dwarf64_linenum(const char *filename, int32_t linenumber,
+ int32_t segto)
{
(void)segto;
dwarf64_findfile(filename);
}
/* called from elf_out with type == TY_DEBUGSYMLIN */
-void dwarf64_output(int type, void *param)
+static void dwarf64_output(int type, void *param)
{
int ln, aa, inx, maxln, soc;
struct symlininfo *s;
}
-void dwarf64_generate(void)
+static void dwarf64_generate(void)
{
uint8_t *pbuf;
int indx;
WRITEDLONG(pbuf,0); /* null ending offset */
}
-void dwarf64_cleanup(void)
+static void dwarf64_cleanup(void)
{
if (arangesbuf)
nasm_free(arangesbuf);
if (locbuf)
nasm_free(locbuf);
}
-void dwarf64_findfile(const char * fname)
+static void dwarf64_findfile(const char * fname)
{
int finx;
struct linelist *match;
}
}
/* */
-void dwarf64_findsect(const int index)
+static void dwarf64_findsect(const int index)
{
int sinx;
struct sectlist *match;