public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: cgd@broadcom.com
To: ica2_ts@csv.ica.uni-stuttgart.de
Cc: binutils@sources.redhat.com
Subject: Re: [PATCH] Fix distinction of 32/64bit addresses in MIPS gas
Date: Fri, 31 Aug 2001 12:41:00 -0000	[thread overview]
Message-ID: <yov5ofow585q.fsf@highland.sibyte.com> (raw)
In-Reply-To: <mailpost.999283589.5294@postal.sibyte.com>

ica2_ts@csv.ica.uni-stuttgart.de ("Thiemo Seufer") writes:
> Can you give a example where R_MIPS_64 is actually needed instead
> of R_MIPS_32? If the output is truncated I can't see why R_MIPS_32
> (possibly with tweaked content) insn't enough.

cat > foo.c << __EOF__
extern int foo;

int *bar = &foo;
__EOF
mips-elf-gcc -mips4 -mlong64 -c foo.c


i believe that should be sufficient.  (certainly, it does the trick
here with both our mips-linux tools and mips-elf-variant tools... 8-)

yes, i know that the pointer is going to be constrainted to being a
sign-extended 32-bit value, but neither the compiler or any assembly
code that uses it needs to know that (or should).  As far as they're
concerned, pointers are 64-bit values and they're loaded with ld, etc.

yes, there's code that actually uses this.  why?  it's really nice to
have code that is linked into a 32-bit address space, but can have
'usable' 64-bit pointers in C code.  e.g. code that lives at the boot
vector, but wants to address data in xkphys...  One could use 64-bit
ELF for these programs, but that support is really new (does it even
work completely yet?), and, really, there's no reason for people doing
this to _want_ to switch to 64-bit ELF so why do it?



chris

  parent reply	other threads:[~2001-08-31 12:41 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-24 18:26 Thiemo Seufer
2001-08-31  8:02 ` Richard Sandiford
2001-08-31  8:28   ` H . J . Lu
2001-08-31  9:17   ` Thiemo Seufer
2001-08-31  9:53     ` Geoff Keating
2001-08-31 10:31       ` Thiemo Seufer
     [not found]         ` <mailpost.999279120.2469@postal.sibyte.com>
2001-08-31 10:37           ` cgd
2001-08-31 11:46             ` Thiemo Seufer
2001-08-31 11:49               ` Ian Lance Taylor
2001-08-31 11:50               ` Ian Lance Taylor
     [not found]               ` <mailpost.999283589.5294@postal.sibyte.com>
2001-08-31 12:41                 ` cgd [this message]
2001-08-31 14:31                   ` H . J . Lu
2001-09-03 23:07                     ` cgd
2001-09-06 10:50                       ` H . J . Lu
2001-09-06 10:59                         ` cgd
2001-09-06 11:07                           ` H . J . Lu
2001-09-06 11:35                             ` Thiemo Seufer
2001-09-06 11:39                             ` cgd
2001-09-06 11:40                               ` cgd
2001-09-08 12:03                               ` Andrew Cagney
2001-09-08 16:38                                 ` Thiemo Seufer
2001-09-08 16:56                                   ` Thiemo Seufer
2001-09-06 11:57                             ` Richard Sandiford
2001-09-06 20:53                               ` Thiemo Seufer
2001-09-06 21:09                                 ` Thiemo Seufer
2001-09-06 21:12                                 ` Thiemo Seufer
2001-09-06 22:38                                   ` H . J . Lu
2001-09-06 23:11                                     ` Thiemo Seufer
2001-09-07  4:10                                 ` Richard Sandiford
2001-09-07  6:22                                   ` Thiemo Seufer
2001-09-07  7:02                                     ` Richard Sandiford
2001-09-07  8:11                                       ` Thiemo Seufer
2001-09-07  9:20                                         ` Richard Sandiford
2001-09-07  9:49                                           ` Thiemo Seufer
2001-09-06 11:14                           ` Thiemo Seufer
2001-09-06 11:08                         ` Thiemo Seufer
2001-08-31 18:22                   ` Thiemo Seufer
2001-09-03  2:57                     ` Richard Sandiford
2001-09-03 15:00                       ` Thiemo Seufer
2001-08-31 14:49               ` Andrew Cagney
2001-08-31 15:00                 ` H . J . Lu
2001-08-31 16:30                   ` Eric Christopher
2001-08-31 16:41                     ` Andrew Cagney
2001-08-31 16:46                       ` H . J . Lu
2001-08-31 17:45                         ` matthew green
2001-09-02 19:25                         ` J Grant
2001-08-31 16:44                     ` H . J . Lu
2001-08-31 17:42                       ` matthew green
2001-08-31 19:06                         ` H . J . Lu
2001-08-31 19:11                           ` matthew green
     [not found]                             ` <mailpost.999310274.17560@postal.sibyte.com>
2001-09-03 23:18                               ` cgd
2001-09-06 11:00                                 ` H . J . Lu
2001-09-06 11:38                                   ` cgd
2001-09-06 12:09                                     ` H . J . Lu
2001-08-31 18:49                     ` Thiemo Seufer
2001-08-31 17:35                   ` matthew green
2001-08-31 19:05                     ` H . J . Lu
2001-08-31 18:25                 ` Thiemo Seufer
2001-08-31 20:46                   ` Ian Lance Taylor
2001-08-31 21:04                     ` Thiemo Seufer
2001-08-31 10:04     ` Richard Sandiford
2001-08-31 10:41       ` Thiemo Seufer

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=yov5ofow585q.fsf@highland.sibyte.com \
    --to=cgd@broadcom.com \
    --cc=binutils@sources.redhat.com \
    --cc=ica2_ts@csv.ica.uni-stuttgart.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).