From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-03 20:30:19
|
Commit-ID: 54469e27d0565ceab1cce273cd120c4d4055a509 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=54469e27d0565ceab1cce273cd120c4d4055a509 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Thu, 3 Mar 2016 12:29:25 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Thu, 3 Mar 2016 12:29:25 -0800 outmacho: remove unused debugging functions Remove unused debugging functions, and the _unused macro which turned out to cause compilation problems on Linux/PowerPC. Signed-off-by: H. Peter Anvin <hp...@zy...> --- compiler.h | 6 ------ output/outmacho.c | 27 --------------------------- 2 files changed, 33 deletions(-) diff --git a/compiler.h b/compiler.h index 4a68576..7daf6ec 100644 --- a/compiler.h +++ b/compiler.h @@ -81,12 +81,6 @@ # endif #endif -#ifdef __GNUC__ -# define _unused __attribute__((unused)) -#else -# define _unused -#endif - /* Some versions of MSVC have these only with underscores in front */ #include <stddef.h> #include <stdarg.h> diff --git a/output/outmacho.c b/output/outmacho.c index 746dbcb..9a43114 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -300,9 +300,6 @@ static uint64_t rel_padcnt = 0; #define alignptr(x) \ ALIGN(x, fmt.ptrsize) /* align x to output format width */ -static void debug_reloc (struct reloc *); -static void debug_section_relocs (struct section *) _unused; - static struct section *get_section_by_name(const char *segname, const char *sectname) { @@ -1595,30 +1592,6 @@ static void macho_cleanup(int debuginfo) nasm_free(sectstab); } -/* Debugging routines. */ -static void debug_reloc (struct reloc *r) -{ - fprintf (stdout, "reloc:\n"); - fprintf (stdout, "\taddr: %"PRId32"\n", r->addr); - fprintf (stdout, "\tsnum: %d\n", r->snum); - fprintf (stdout, "\tpcrel: %d\n", r->pcrel); - fprintf (stdout, "\tlength: %d\n", r->length); - fprintf (stdout, "\text: %d\n", r->ext); - fprintf (stdout, "\ttype: %d\n", r->type); -} - -static void debug_section_relocs (struct section *s) -{ - struct reloc *r = s->relocs; - - fprintf (stdout, "relocs for section %s:\n\n", s->sectname); - - while (r != NULL) { - debug_reloc (r); - r = r->next; - } -} - #ifdef OF_MACHO32 static const struct macho_fmt macho32_fmt = { 4, |