This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv] New comment: detection of prelinked libraries on PPC
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Fri, 12 Feb 2010 00:10:05 +0100
- Subject: [obv] New comment: detection of prelinked libraries on PPC
Hi,
checked-in a comment excerpt from this mail:
[rfa] Fix detection of prelinked libraries on PPC
http://sourceware.org/ml/gdb-patches/2007-07/msg00109.html
http://sourceware.org/ml/gdb-cvs/2007-07/msg00055.html
fc5294c8de7ee77ec3ed9e0ca2dff670d0e7789f
((l_addr & align) == 0 && ((dynaddr - l_dynaddr) & align) == 0)
->
((l_addr & align) == ((l_dynaddr - dynaddr) & align))
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2010-02/msg00083.html
--- src/gdb/ChangeLog 2010/02/11 23:03:21 1.11350
+++ src/gdb/ChangeLog 2010/02/11 23:07:22 1.11351
@@ -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
--- src/gdb/solib-svr4.c 2010/02/04 22:54:41 1.118
+++ src/gdb/solib-svr4.c 2010/02/11 23:07:23 1.119
@@ -217,7 +217,19 @@
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;