From: Daniel Jacobowitz <dan@debian.org>
To: "Steven J. Hill" <sjhill@cotw.com>, linux-mips@oss.sgi.com
Subject: Question on the binutils tradlittlemips patch
Date: Wed, 18 Apr 2001 14:19:59 -0400 [thread overview]
Message-ID: <20010418141959.A24473@nevyn.them.org> (raw)
I've been trying to make this patch work as part of a complete
toolchain, based on glibc. In addition to a little snag (when building
glibc for big-endian mips you need an equivalent change in the target
format), I hit a serious shared library error - nothing linked
dynamically worked. This is the cause:
--- elf32lsmip.sh Thu Jun 3 14:02:10 1999
+++ elf32ltsmip.sh Wed Apr 11 00:14:08 2001
...
-SHLIB_TEXT_START_ADDR=0x5ffe0000
+SHLIB_TEXT_START_ADDR=0x0
Is this necessary for the ABI? If so, glibc needs to be updated to
reflect that:
/*
* MIPS libraries are usually linked to a non-zero base address. We
* subtract the base address from the address where we map the object
* to. This results in more efficient address space usage.
*
* FIXME: By the time when MAP_BASE_ADDR is called we don't have the
* DYNAMIC section read. Until this is fixed make the assumption that
* libraries have their base address at 0x5ffe0000. This needs to be
* fixed before we can safely get rid of this MIPSism.
*/
#if 0
#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
(l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
#else
#define MAP_BASE_ADDR(l) 0x5ffe0000
#endif
Of course, now that is completely wrong.
One of the two definitely needs to give. From the evilness of the hack
in glibc, I'm assuming that glibc needs to give.
Am I on the right track here?
--
Daniel Jacobowitz Debian GNU/Linux Developer
Monta Vista Software Debian Security Team
next reply other threads:[~2001-04-18 18:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-18 18:19 Daniel Jacobowitz [this message]
2001-04-18 20:11 ` Question on the binutils tradlittlemips patch Andreas Jaeger
2001-04-18 21:03 ` Daniel Jacobowitz
2001-04-18 20:47 ` Steven J. Hill
2001-04-18 20:37 ` Daniel Jacobowitz
2001-04-23 1:07 ` Keith M Wesolowski
2001-04-23 2:19 ` Daniel Jacobowitz
2001-04-23 4:23 ` Keith M Wesolowski
2001-04-23 4:34 ` Daniel Jacobowitz
2001-04-23 5:54 ` Andreas Jaeger
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=20010418141959.A24473@nevyn.them.org \
--to=dan@debian.org \
--cc=linux-mips@oss.sgi.com \
--cc=sjhill@cotw.com \
/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