From: Alan Modra <amodra@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: "Maciej W. Rozycki" <macro@codesourcery.com>,
Richard Sandiford <rdsandiford@googlemail.com>,
Catherine Moore <clm@codesourcery.com>,
binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] MIPS: Compressed PLT/stubs support
Date: Fri, 22 Feb 2013 00:58:00 -0000 [thread overview]
Message-ID: <20130222005833.GJ3080@bubble.grove.modra.org> (raw)
In-Reply-To: <87wqu19y1x.fsf@fleche.redhat.com>
On Thu, Feb 21, 2013 at 02:06:34PM -0700, Tom Tromey wrote:
> Maciej> if (type != ST_SYNTHETIC)
> Maciej> elf_sym = (elf_symbol_type *) sym;
> Maciej> - else
> Maciej> + else if (((sym->udata.i | 0xff) ^ 0xff) != 0)
> Maciej> elf_sym = (elf_symbol_type *) sym->udata.p;
> Maciej> + else
> Maciej> + elf_sym = NULL;
>
> This seems iffy to me. I suppose what gives me pause is the possibility
> that this condition will trigger on some other port that does something
> odd in BFD.
ppc64 is the only target that currently provides get_synthetic_symtab
returning non-NULL values of udata.
We have
union
{
void *p;
bfd_vma i;
}
udata;
"i" is always 64 bits when ppc64 is supported by BFD. The size of "p"
depends on the host. If they happen to both be 64-bit the analysis is
easy and Maciej's change will break ppc64 if "p" can have an address
in the range [0,255]. For 32-bit little-endian hosts we get the same
result. For 32-bit big-endian hosts, "p" occupies the high 32 bits of
"i", so any non-NULL value of "p" will pass the new test.
I doubt we care about hosts that might allocate memory from the zero
page, so Maciej's change is OK as far as I'm concerned.
Hmm, perhaps a cleaner change would be implement make_msymbol_special
for ppc64 and move the udata.p special case out of elf_symtab_read?
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2013-02-22 0:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 20:44 Maciej W. Rozycki
2013-02-19 20:45 ` [PATCH 2/2] MIPS: Compressed PLT/stubs support test cases Maciej W. Rozycki
2013-02-20 21:53 ` [PATCH 1/2] MIPS: Compressed PLT/stubs support Richard Sandiford
2013-03-09 4:04 ` Maciej W. Rozycki
2013-03-09 9:58 ` Richard Sandiford
2013-06-08 0:22 ` Maciej W. Rozycki
2013-06-08 16:04 ` Richard Sandiford
2013-06-10 17:13 ` Maciej W. Rozycki
2013-06-10 18:08 ` Richard Sandiford
2013-06-10 19:34 ` Maciej W. Rozycki
2013-06-25 0:40 ` Maciej W. Rozycki
2013-03-11 13:53 ` Joel Brobecker
2013-06-26 15:02 ` Maciej W. Rozycki
2013-02-21 21:06 ` Tom Tromey
2013-02-22 0:58 ` Alan Modra [this message]
2013-02-22 6:06 ` Alan Modra
2013-02-22 20:09 ` Tom Tromey
2013-03-09 4:06 ` Maciej W. Rozycki
2013-06-20 16:20 ` [PING^2][PATCH] in_plt_section: support alternate stub section names (was: [PATCH 1/2] MIPS: Compressed PLT/stubs support) Maciej W. Rozycki
2013-06-20 16:50 ` [PING^2][PATCH] in_plt_section: support alternate stub section names Pedro Alves
2013-06-21 11:43 ` Maciej W. Rozycki
2013-06-21 15:34 ` Pedro Alves
2013-06-22 2:24 ` Maciej W. Rozycki
2013-06-24 12:40 ` Pedro Alves
2013-06-24 23:34 ` Maciej W. Rozycki
2013-06-25 9:57 ` Pedro Alves
2013-06-07 13:25 ` [PATCH] in_plt_section: support alternate stub section names (was: [PATCH 1/2] MIPS: Compressed PLT/stubs support) Maciej W. Rozycki
2013-06-13 12:43 ` [PING][PATCH] " Maciej W. Rozycki
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=20130222005833.GJ3080@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=clm@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=macro@codesourcery.com \
--cc=rdsandiford@googlemail.com \
--cc=tromey@redhat.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