gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 11 Feb 2010 23:07:23 +0000 (23:07 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 11 Feb 2010 23:07:23 +0000 (23:07 +0000)
* solib-svr4.c (LM_ADDR_CHECK): New comment on PPC-aware condition.

gdb/ChangeLog
gdb/solib-svr4.c

index c26c022527405ee2520e114f5ee6c3a5a8138828..0cd8fd7b5e8010419f66cdbde6659eab6d544ad3 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
+           Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * solib-svr4.c (LM_ADDR_CHECK): New comment on PPC-aware condition.
+
 2010-02-11  Pedro Alves  <pedro@codesourcery.com>
 
        * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out if
index 2833ed140d472c2ca151f5176fc509192fcccc31..9d4e59edf6c018eb0ab4b585e7d3cc98157a91d9 100644 (file)
@@ -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;
This page took 0.028942 seconds and 4 git commands to generate.