From: Brendan J Simon <Brendan.Simon@ctam.com.au>
Cc: linuxppc-dev <linuxppc-dev@lists.linuxppc.org>
Subject: dynamic binaries not working.
Date: Wed, 05 Jan 2000 18:04:14 +1100 [thread overview]
Message-ID: <3872ECED.6E46EBF6@ctam.com.au> (raw)
In-Reply-To: 3872E8B5.F088FE57@fadata.bg
Momchil 'Velco' Velikov wrote:
> Brendan J Simon wrote:
> > I am having problems getting simple shared executalbes to work on my embedded powerpc system
> > (MPC860). I am using an egcs-1.1.2 cross compiler and have cross-compiled linux-2.2.5 kernel,
> > glibc-2.1 and some simple test applications. I have an app that outputs a string every second
> > using puts(). If I compile with "powerpc-linux-gcc -m860 -static" it works, but if I compile
> > with "powerpc-linux-gcc -m860 -shared" it doesn't work. I am mount root via nfs and the nfs
>
> -shared is used to *create* a shared library. You need -Bdynamic in
> order to force the executable to be linked against shared libraries.
I removed the -shared argument and the executable now looks a lot better interms of the vaddr and
program headers etc. I used "powerpc-linux-gcc -Wall -mcpu=860 -fpic -o bjs1 bjs1.c". I tried
with -fPIC, -fpic and without either. The program still does not run however. The output of
objdump -p is below.
Does this look OK ?
Any suggestions for debugging the code or the shared libraries ?
Thanks,
Brendan Simon.
# powerpc-linux-objdump -p bjs1
bjs1: file format elf32-powerpc
Program Header:
PHDR off 0x00000034 vaddr 0x01800034 paddr 0x01800034 align 2**2
filesz 0x000000e0 memsz 0x000000e0 flags r-x
INTERP off 0x00000114 vaddr 0x01800114 paddr 0x01800114 align 2**0
filesz 0x0000000d memsz 0x0000000d flags r--
LOAD off 0x00000000 vaddr 0x01800000 paddr 0x01800000 align 2**16
filesz 0x000004e4 memsz 0x000004e4 flags r-x
LOAD off 0x000004e8 vaddr 0x018404e8 paddr 0x018404e8 align 2**16
filesz 0x000000e4 memsz 0x00000168 flags rwx
DYNAMIC off 0x00000508 vaddr 0x01840508 paddr 0x01840508 align 2**2
filesz 0x000000a0 memsz 0x000000a0 flags rw-
NOTE off 0x00000130 vaddr 0x01800130 paddr 0x01800130 align 2**4
filesz 0x00000020 memsz 0x00000020 flags r--
Dynamic Section:
NEEDED libc.so.6
INIT 0x180048c
FINI 0x18004b0
HASH 0x1800150
STRTAB 0x1800204
SYMTAB 0x1800184
STRSZ 0x74
SYMENT 0x10
DEBUG 0x0
PLTGOT 0x18405cc
PLTRELSZ 0x3c
PLTREL 0x7
JMPREL 0x18002b4
RELA 0x18002b4
RELASZ 0x3c
RELAENT 0xc
VERNEED 0x1800294
VERNEEDNUM 0x1
VERSYM 0x1800282
Version References:
required from libc.so.6:
0x0d696910 0x00 02 GLIBC_2.0
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2000-01-05 7:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-04 23:00 Linux ABI documents and powerpc supplements Brendan J Simon
2000-01-05 0:23 ` Franz Sirl
2000-01-05 5:08 ` Brendan J Simon
2000-01-05 6:46 ` Momchil 'Velco' Velikov
2000-01-05 6:21 ` Brendan J Simon
2000-01-05 10:19 ` Michael Schmitz
2000-01-05 7:04 ` Brendan J Simon [this message]
2000-01-05 8:34 ` dynamic binaries not working Daniel Jacobowitz
2000-01-05 12:47 ` Kenneth Johansson
2000-01-05 22:24 ` MPC860 patches for glibc Brendan J Simon
2000-01-05 23:36 ` Graham Stoney
2000-01-06 13:18 ` Jesper Skov
2000-01-07 1:44 ` Brendan J Simon
2000-01-08 8:46 ` Jesper Skov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3872ECED.6E46EBF6@ctam.com.au \
--to=brendan.simon@ctam.com.au \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).