This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-zcombreloc-less shared libs from ld


Hello,
   Does anyone have any insights into this issue. One ppclinux under
glibc cvs while testing prelinking I discovered that the resulting
binary for /usr/bin/hesinfo was unprelinkable due to an error...

prelink: /usr/lib/libhesiod.so.0: DT_JMPREL tag not adjacent to DT_RELA relocations

which Jakub says is because /usr/lib/libhesiod.so.0 isn't properly
-zcombreloc. I find this odd since the binutils is -zcombreloc enabled.
The rawhide srpm for hesiod is using a patch for creating sharedlibs.
If I make the following change to this patch...

--- hesiod-3.0.2-shlib.patch	Fri Oct 26 09:52:02 2001
+++ hesiod-3.0.2-shlib.patch.new	Sat Sep 28 01:19:19 2002
@@ -13,7 +13,7 @@
 +all: libhesiod.a hesinfo hestest libhesiod.so.$(SOVERSION)
 +
 +libhesiod.so.$(SOVERSION): ${OBJS}
-+	$(LD) -G -o $@ -soname=$@ ${OBJS} ${LIBS} -lc
++	$(CC) -shared -Wl,-soname,$@ -o $@ ${OBJS} ${LIBS} 
  
  libhesiod.a: ${OBJS}
  	ar cru $@ ${OBJS}

The resulting shared lib for /usr/lib/libhesiod.so.0 appears properly
-zcombreloc and is prelinkable. Is this expected behavior? Shouldn't
it be sufficient to pass -soname= to ld to get -zcombreloc shared libs
from it? Thanks in advance for any clarifications.
                       Jack


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]