diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-03-11 22:07:03 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2010-03-11 22:07:03 +0000 |
commit | ccf26247763aa6c68b6cb7990c98afe881e8f811 (patch) | |
tree | b04f7bf30dc6fd2842da39fdbbf42ac8125e6609 /gdb/solib-svr4.c | |
parent | 477c84a75fdca66b9f85ad33e0c5a4ae2226b789 (diff) | |
download | gdb-ccf26247763aa6c68b6cb7990c98afe881e8f811.zip gdb-ccf26247763aa6c68b6cb7990c98afe881e8f811.tar.gz gdb-ccf26247763aa6c68b6cb7990c98afe881e8f811.tar.bz2 |
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.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index d10a209..bae7200 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; } |