summaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:01:24 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-14 21:01:24 +0000
commit95f4c8f6fa84b6178c7288704414630e3ac15f18 (patch)
tree5e6f8eddc0917478f0a870cebc4821121022e4d0 /gdb/solib-svr4.c
parente10f16a4071bc4f8463d3830241f3e8d9cea1598 (diff)
downloadgdb-95f4c8f6fa84b6178c7288704414630e3ac15f18.tar.gz
gdb/
Support PIEs with no symfile_objfile. * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point. * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block. gdb/testsuite/ Support PIEs with no symfile_objfile. * gdb.base/break-interp.exp: New argument at the test_ld calls. (test_ld): New parameter trynosym. (test_ld <$trynosym>): New block.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 3ad067ab7e1..a2feabd4c76 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1649,6 +1649,15 @@ svr4_relocate_main_executable (void)
objfile_relocate (symfile_objfile, new_offsets);
}
+ else if (exec_bfd)
+ {
+ asection *asect;
+
+ for (asect = exec_bfd->sections; asect != NULL; asect = asect->next)
+ exec_set_section_address (bfd_get_filename (exec_bfd), asect->index,
+ (bfd_section_vma (exec_bfd, asect)
+ + displacement));
+ }
}
/*