ref: 347a2a6c2decb0dc4abcafc4017cfa15d299416a
parent: e96b586c7023078936c3a1b1081b9239288b9567
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 23 14:06:46 EDT 2019
[libmach] Remove objsync() It is not sure if this function is needed.
--- a/include/scc/scc/mach.h
+++ b/include/scc/scc/mach.h
@@ -82,5 +82,4 @@
/* TODO */
extern int objaddseg(Obj *obj, void *seg);
-extern int objsync(Obj *obj);
extern int objreloc(Obj *obj, char *sect, void *rel);
--- a/src/cmd/ld/pass5.c
+++ b/src/cmd/ld/pass5.c
@@ -47,6 +47,5 @@
/* TODO: write line information */
fp = fopen(output, "wb");
- objsync(obj);
(obj->ops->write)(obj, fp);
}
--- a/src/libmach/coff32/Makefile
+++ b/src/libmach/coff32/Makefile
@@ -15,7 +15,6 @@
coff32xgetidx.o \
coff32setidx.o \
coff32getidx.o \
- coff32sync.o \
coff32addr2line.o \
all: $(OBJS)
--- a/src/libmach/coff32/coff32sync.c
+++ /dev/null
@@ -1,10 +1,0 @@
-#include <stdio.h>
-
-#include <scc/mach.h>
-
-#include "../libmach.h"
-
-int
-coff32sync(Obj *obj)
-{
-}
--- a/src/libmach/libmach.h
+++ b/src/libmach/libmach.h
@@ -33,7 +33,6 @@
extern int coff32probe(unsigned char *buf, char **name);
extern char *coff32namidx(void);
-extern int coff32sync(Obj *obj);
/* globals */
extern Objops *objops[];
--- a/src/libmach/objsync.c
+++ /dev/null
@@ -1,20 +1,0 @@
-#include <stdio.h>
-
-#include <scc/mach.h>
-
-#include "libmach.h"
-
-static int (*funv[])(Obj *) = {
- [COFF32] = coff32sync,
-};
-
-int
-objsync(Obj *obj)
-{
- int fmt;
-
- fmt = FORMAT(obj->type);
- if (fmt >= NFORMATS)
- return -1;
- return (*funv[fmt])(obj);
-}