NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [netbsd-5] SHLIBDIR and SHLINKDIR behavior change?
Quentin:
Thanks for having a look.
pax(1) seems to work, but my custom bzip(1) and gzip(1) binary do not.
In comparison, the RPATH location contains /lib in all three (including
netbsd-4):
bash-3.2# for a in pax gzip bzip2; do readelf -d $a; done
Dynamic section at offset 0x19278 contains 19 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libutil.so.7]
0x00000001 (NEEDED) Shared library: [libc.so.12]
0x0000000f (RPATH) Library rpath: [/lib]
0x0000000c (INIT) 0x8049a10
0x0000000d (FINI) 0x805d100
0x00000004 (HASH) 0x8048154
0x00000005 (STRTAB) 0x8049010
0x00000006 (SYMTAB) 0x80485f0
0x0000000a (STRSZ) 1303 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x8062358
0x00000002 (PLTRELSZ) 1152 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x8049590
0x00000011 (REL) 0x8049528
0x00000012 (RELSZ) 104 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
Dynamic section at offset 0x6014 contains 20 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libz.so.1]
0x00000001 (NEEDED) Shared library: [libbz2.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.12]
0x0000000f (RPATH) Library rpath: [/lib]
0x0000000c (INIT) 0x8048e30
0x0000000d (FINI) 0x804cd80
0x00000004 (HASH) 0x8048154
0x00000005 (STRTAB) 0x80488d0
0x00000006 (SYMTAB) 0x80483b0
0x0000000a (STRSZ) 731 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x804e0fc
0x00000002 (PLTRELSZ) 536 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x8048c0c
0x00000011 (REL) 0x8048bac
0x00000012 (RELSZ) 96 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
Dynamic section at offset 0x58b0 contains 19 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libbz2.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.12]
0x0000000f (RPATH) Library rpath: [/lib]
0x0000000c (INIT) 0x8048ab0
0x0000000d (FINI) 0x804bd10
0x00000004 (HASH) 0x8048154
0x00000005 (STRTAB) 0x80486a0
0x00000006 (SYMTAB) 0x80482e0
0x0000000a (STRSZ) 582 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x804e990
0x00000002 (PLTRELSZ) 368 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x8048940
0x00000011 (REL) 0x80488e8
0x00000012 (RELSZ) 88 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000000 (NULL) 0x0
On Fri, 6 Feb 2009, Quentin Garnier wrote:
> On Fri, Feb 06, 2009 at 04:47:26PM -0500, Brian A. Seklecki wrote:
> >
> > All:
> >
> > Has the behavior of these macros in the build system changed? I used to
> > inject:
> >
> > SHLINKDIR= /libexec
> > SHLIBDIR= /lib
> >
> > Into src/usr.bin/gzip/Makefile and src/usr.bin/bzip/Makefile to order to
> > link against /lib/libc.so, /lib/libbz2.so.1.1 and /lib/libz.so.1.0 (the
> > later two I place manually)
> >
> > These changes are important to make the bootstrap part of my embedded
> > environment function.
> >
> > I'm building for the first time on netbsd-5 (RC1). For some reason, I am
> > recieving:
> >
> > # chroot /home/fsimages/rd_root /bin/gzip
> > Shared object "libc.so.12" not found
> >
> > However:
> >
> > # file rd_root/bin/gzip
> > rd_root/bin/gzip: ELF 32-bit LSB executable, Intel 80386, version 1
> > (SYSV), dynamically linked (uses shared libs), for NetBSD 5.0, not
> > stripped
> >
> > rd_root/bin/gzip:
> > -lc.12 => /lib/libc.so.12
> > -lz.1 => /lib/libz.so.1
> > -lbz2.1 => /lib/libbz2.so.1
>
> That's not really surprising outside the chroot.
>
> If you do "readelf -d rd_root/bin/gzip" I suspect it won't list /lib in
> the RPATH, which would then be your issue. Now, why wasn't the binary
> linked properly I don't know, but at least you'll know more about where
> to look.
>
> --
> Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
> "See the look on my face from staying too long in one place
> [...] every time the morning breaks I know I'm closer to falling"
> KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
>
l8*
-lava (Brian A. Seklecki - Pittsburgh, PA, USA)
http://www.spiritual-machines.org/
"Show me a young conservative and I'll show you someone with no heart.
Show me an old liberal and I'll show you someone with no brains."
~ Winston Churchill
Home |
Main Index |
Thread Index |
Old Index