aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-02-11 23:07:23 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-02-11 23:07:23 +0000
commit5c0d192f85f9c5f6897e3a721fe4ff5643c7ce27 (patch)
tree9486928894ee8c562be5f6228e36fa4371f6ea87 /gdb/solib-svr4.c
parent5d5b640e00fd8d48d15cd3b8118ca281055ada9b (diff)
downloadgdb-5c0d192f85f9c5f6897e3a721fe4ff5643c7ce27.zip
gdb-5c0d192f85f9c5f6897e3a721fe4ff5643c7ce27.tar.gz
gdb-5c0d192f85f9c5f6897e3a721fe4ff5643c7ce27.tar.bz2
gdb/
* solib-svr4.c (LM_ADDR_CHECK): New comment on PPC-aware condition.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 2833ed1..9d4e59e 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -217,7 +217,19 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
location, or anything, really. To avoid regressions,
don't adjust the base offset in the latter case, although
odds are that, if things really changed, debugging won't
- quite work. */
+ quite work.
+
+ One could expect more the condition
+ ((l_addr & align) == 0 && ((l_dynaddr - dynaddr) & align) == 0)
+ but the one below is relaxed for PPC. The PPC kernel supports
+ either 4k or 64k page sizes. To be prepared for 64k pages,
+ PPC ELF files are built using an alignment requirement of 64k.
+ However, when running on a kernel supporting 4k pages, the memory
+ mapping of the library may not actually happen on a 64k boundary!
+
+ (In the usual case where (l_addr & align) == 0, this check is
+ equivalent to the possibly expected check above.) */
+
if ((l_addr & align) == ((l_dynaddr - dynaddr) & align))
{
l_addr = l_dynaddr - dynaddr;