From: H. Peter Anvin Date: Thu, 3 Jan 2013 17:29:51 +0000 (-0800) Subject: elflink: set the sonames of shared libraries X-Git-Tag: syslinux-5.01-pre1~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bede445728bfc519f649d69d6e0bcc196ed74de;p=platform%2Fupstream%2Fsyslinux.git elflink: set the sonames of shared libraries Set the sonames of shared libraries to the filename, so we don't end up with full pathnames embedded in the files. --- diff --git a/com32/elflink/ldlinux/Makefile b/com32/elflink/ldlinux/Makefile index 93ca127..43ea632 100644 --- a/com32/elflink/ldlinux/Makefile +++ b/com32/elflink/ldlinux/Makefile @@ -22,7 +22,7 @@ all: ldlinux.c32 ldlinux_lnx.a ldlinux.c32 : ldlinux.o cli.o readconfig.o refstr.o colors.o getadv.o \ adv.o execute.o chainboot.o kernel.o get_key.o \ advwrite.o setadv.o eprintf.o loadhigh.o msg.o - $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) + $(LD) $(LDFLAGS) -soname $(@F) -o $@ $^ $(LIBS) LNXCFLAGS += -D__export='__attribute__((visibility("default")))' LNXLIBOBJS = get_key.lo diff --git a/com32/gpllib/Makefile b/com32/gpllib/Makefile index 92dd20f..053e864 100644 --- a/com32/gpllib/Makefile +++ b/com32/gpllib/Makefile @@ -22,7 +22,7 @@ COM32DIR = $(AUXDIR)/com32 all: libcom32gpl.c32 libcom32gpl.c32 : $(LIBOBJS) - $(LD) -shared $(LDFLAGS) -o $@ $^ + $(LD) -shared $(LDFLAGS) -soname $(@F) -o $@ $^ tidy dist clean: find . \( -name \*.o -o -name .\*.d -o -name \*.tmp \) -print0 | \ diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 84f65c1..7806230 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -216,7 +216,7 @@ all: libcom32.c32 libcom32min.a libcom32core.a libcom32.c32 : $(LIBOBJS) rm -f $@ - $(LD) -shared $(LDFLAGS) -o $@ $^ + $(LD) -shared $(LDFLAGS) -soname $(@F) -o $@ $^ libcom32min.a : $(MINLIBOBJS) rm -f $@ diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile index 93c0c11..fb437dc 100644 --- a/com32/libutil/Makefile +++ b/com32/libutil/Makefile @@ -42,7 +42,7 @@ LNXLIBOBJS = $(patsubst %.o,%.lo,$(LIBOBJS)) all: libutil_com.c32 libutil_lnx.a libutil_com.c32: $(LIBOBJS) - $(LD) $(LDFLAGS) -o $@ $^ + $(LD) $(LDFLAGS) -soname $(@F) -o $@ $^ libutil_lnx.a: $(LNXLIBOBJS) rm -f $@