diff options
author | H. Peter Anvin <hpa@zytor.com> | 2016-03-03 12:29:25 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2016-03-03 12:29:25 -0800 |
commit | 54469e27d0565ceab1cce273cd120c4d4055a509 (patch) | |
tree | dab6ff908bac07e4e0cb22c66ab97c51138894ad | |
parent | 140c214ad04a51dab937cda1fe1ea4b9d60fb86d (diff) | |
download | nasm-54469e27d0565ceab1cce273cd120c4d4055a509.tar.gz |
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 <hpa@zytor.com>
-rw-r--r-- | compiler.h | 6 | ||||
-rw-r--r-- | output/outmacho.c | 27 |
2 files changed, 0 insertions, 33 deletions
@@ -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 746dbcbb..9a431147 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, |