summaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-03-11 22:07:00 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-03-11 22:07:00 +0000
commit5855954454f19a801f76bbf7baafd11a693c5d33 (patch)
treeb56d2f960b0adb05b5d0ffeed70745a7d387a73b /gdb/solib-svr4.c
parent043e5eaafd16dec9eb216f138b2c2d35269d3b57 (diff)
downloadgdb-5855954454f19a801f76bbf7baafd11a693c5d33.tar.gz
gdb/
* solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered for the PIC displacement, print also the displacement value. (svr4_exec_displacement): Print DISPLACEMENT if INFO_VERBOSE. gdb/testsuite/ * gdb.base/break-interp.exp: Create new displacement parameter value for the test_ld calls. (reach): New parameter displacement, verify its content. New push of pf_prefix "reach-$func:". Import global expect_out. (test_core): New parameter displacement, verify its content. New push of pf_prefix "core:". New command "set verbose on". Import global expect_out. (test_attach): New parameter displacement, verify its content. New push of pf_prefix "attach:". New command "set verbose on". Import global expect_out. (test_ld): New parameter displacement, pass it to the reach, test_core and test_attach calls and verify its content in the "ld.so exit" test. * gdb.base/prelink.exp: Remove gdb_exit and final return. (prelink): Update expected text, use gdb_test.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index d10a20977e5..bae72006675 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -243,12 +243,10 @@ LM_ADDR_CHECK (struct so_list *so, bfd *abfd)
l_addr = l_dynaddr - dynaddr;
if (info_verbose)
- {
- warning (_(".dynamic section for \"%s\" "
- "is not at the expected address"), so->so_name);
- warning (_("difference appears to be caused by prelink, "
- "adjusting expectations"));
- }
+ printf_unfiltered (_("Using PIC (Position Independent Code) "
+ "prelink displacement %s for \"%s\".\n"),
+ paddress (target_gdbarch, l_addr),
+ so->so_name);
}
else
warning (_(".dynamic section for \"%s\" "
@@ -1767,6 +1765,18 @@ svr4_exec_displacement (CORE_ADDR *displacementp)
return 0;
}
+ if (info_verbose)
+ {
+ /* It can be printed repeatedly as there is no easy way to check
+ the executable symbols/file has been already relocated to
+ displacement. */
+
+ printf_unfiltered (_("Using PIE (Position Independent Executable) "
+ "displacement %s for \"%s\".\n"),
+ paddress (target_gdbarch, displacement),
+ bfd_get_filename (exec_bfd));
+ }
+
*displacementp = displacement;
return 1;
}