Diff on top of Symbols.map addition, using the same tools as other libs.

check_sym output:
/usr/lib/libsndio.so.7.0 --> obj/libsndio.so.7.0
No dynamic export changes
PLT removed:
        mio_rmidi_getfd
        sio_revents
        sio_sun_fdopen
        sio_sun_getfd

I have already discussed a similar diff with Alexandre, who doesn't like
much the additional lines.  I'm not sure how easily this can be crammed
into the portable version.

Thoughts?  ok?


Index: mio.c
===================================================================
--- mio.c.orig
+++ mio.c
@@ -191,6 +191,7 @@ mio_nfds(struct mio_hdl *hdl)
 {
        return hdl->ops->nfds(hdl);
 }
+DEF(mio_nfds);
 
 int
 mio_pollfd(struct mio_hdl *hdl, struct pollfd *pfd, int events)
@@ -199,6 +200,7 @@ mio_pollfd(struct mio_hdl *hdl, struct p
                return 0;
        return hdl->ops->pollfd(hdl, pfd, events);
 }
+DEF(mio_pollfd);
 
 int
 mio_revents(struct mio_hdl *hdl, struct pollfd *pfd)
@@ -207,6 +209,7 @@ mio_revents(struct mio_hdl *hdl, struct
                return POLLHUP;
        return hdl->ops->revents(hdl, pfd);
 }
+DEF(mio_revents);
 
 int
 mio_eof(struct mio_hdl *hdl)
Index: mio_priv.h
===================================================================
--- mio_priv.h.orig
+++ mio_priv.h
@@ -48,4 +48,13 @@ struct mio_hdl *_mio_aucat_open(const ch
 void _mio_create(struct mio_hdl *, struct mio_ops *, unsigned, int);
 void _mio_destroy(struct mio_hdl *);
 
+#define        PROTO(x)        __dso_hidden typeof(x) x asm("__"#x)
+#define        DEF(x)          __strong_alias(x, __##x)
+
+PROTO(mio_nfds);
+PROTO(mio_pollfd);
+PROTO(mio_revents);
+PROTO(mio_rmidi_getfd);
+PROTO(mio_rmidi_fdopen);
+
 #endif /* !defined(MIO_PRIV_H) */
Index: mio_rmidi.c
===================================================================
--- mio_rmidi.c.orig
+++ mio_rmidi.c
@@ -102,6 +102,7 @@ mio_rmidi_getfd(const char *str, unsigne
        }
        return fd;
 }
+DEF(mio_rmidi_getfd);
 
 struct mio_hdl *
 mio_rmidi_fdopen(int fd, unsigned int mode, int nbio)
@@ -118,6 +119,7 @@ mio_rmidi_fdopen(int fd, unsigned int mo
        hdl->fd = fd;
        return (struct mio_hdl *)hdl;
 }
+DEF(mio_rmidi_fdopen);
 
 struct mio_hdl *
 _mio_rmidi_open(const char *str, unsigned int mode, int nbio)
Index: sio.c
===================================================================
--- sio.c.orig
+++ sio.c
@@ -190,6 +190,7 @@ sio_getpar(struct sio_hdl *hdl, struct s
        par->__magic = 0;
        return 1;
 }
+DEF(sio_getpar);
 
 int
 sio_getcap(struct sio_hdl *hdl, struct sio_cap *cap)
@@ -367,6 +368,7 @@ sio_nfds(struct sio_hdl *hdl)
 {
        return hdl->ops->nfds(hdl);
 }
+DEF(sio_nfds);
 
 int
 sio_pollfd(struct sio_hdl *hdl, struct pollfd *pfd, int events)
@@ -377,6 +379,7 @@ sio_pollfd(struct sio_hdl *hdl, struct p
                events = 0;
        return hdl->ops->pollfd(hdl, pfd, events);
 }
+DEF(sio_pollfd);
 
 int
 sio_revents(struct sio_hdl *hdl, struct pollfd *pfd)
@@ -413,6 +416,7 @@ sio_revents(struct sio_hdl *hdl, struct
                revents &= ~POLLIN;
        return revents;
 }
+DEF(sio_revents);
 
 int
 sio_eof(struct sio_hdl *hdl)
Index: sio_priv.h
===================================================================
--- sio_priv.h.orig
+++ sio_priv.h
@@ -75,4 +75,14 @@ void _sio_onvol_cb(struct sio_hdl *, uns
 void _sio_printpos(struct sio_hdl *);
 #endif
 
+#define        PROTO(x)        __dso_hidden typeof(x) x asm("__"#x)
+#define        DEF(x)          __strong_alias(x, __##x)
+
+PROTO(sio_getpar);
+PROTO(sio_nfds);
+PROTO(sio_pollfd);
+PROTO(sio_revents);
+PROTO(sio_sun_getfd);
+PROTO(sio_sun_fdopen);
+
 #endif /* !defined(SNDIO_PRIV_H) */
Index: sio_sun.c
===================================================================
--- sio_sun.c.orig
+++ sio_sun.c
@@ -307,6 +307,7 @@ sio_sun_getfd(const char *str, unsigned
        }
        return fd;
 }
+DEF(sio_sun_getfd);
 
 struct sio_hdl *
 sio_sun_fdopen(int fd, unsigned int mode, int nbio)
@@ -333,6 +334,7 @@ sio_sun_fdopen(int fd, unsigned int mode
        hdl->filling = 0;
        return (struct sio_hdl *)hdl;
 }
+DEF(sio_sun_fdopen);
 
 struct sio_hdl *
 _sio_sun_open(const char *str, unsigned int mode, int nbio)


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to