aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/prelink.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2006-02-28 04:29:10 +0000
committerAlexandre Oliva <aoliva@redhat.com>2006-02-28 04:29:10 +0000
commitcc10cae34af928d41c47ed1014abafde99165c28 (patch)
tree2c3f3ca2a60ceff5fbdffd0b28c62617b35ca585 /gdb/testsuite/gdb.base/prelink.c
parent10cd14b412f60d6d99ab6ce6c40b1c56c2a8195c (diff)
downloadgdb-cc10cae34af928d41c47ed1014abafde99165c28.zip
gdb-cc10cae34af928d41c47ed1014abafde99165c28.tar.gz
gdb-cc10cae34af928d41c47ed1014abafde99165c28.tar.bz2
gdb/ChangeLog:
* solib-svr4.h (struct link_map_offsets): Add l_ld_offset and l_ld_size fields. * solib-svr4.c (struct lm_info): Add l_addr field. (LM_ADDR_FROM_LINK_MAP): Renamed from LM_ADDR. (HAS_LM_DYNAMIC_FROM_LINK_MAP): New. (LM_DYNAMIC_FROM_LINK_MAP): New. (LM_ADDR_CHECK): New. Use it instead of LM_ADDR. (svr4_current_sos): Initialize l_addr. Adjust. (svr4_relocate_section_addresses): Adjust. (svr4_ilp32_fetch_link_map_offsets): Define new members. (svr4_lp64_fetch_link_map_offsets): Likewise. * solib-legacy.c (legacy_svr4_fetch_link_map_offsets): Likewise. * mipsnbsd-tdep.c (mipsnbsd_ilp32_fetch_link_map_offsets): Likewise. (mipsnbsd_lp64_fetch_link_map_offsets): Likewise. * Makefile.in (solib-svr4.o): Depend on $(elf_bfd_h). gdb/testsuite/ChangeLog: * gdb.base/prelink.exp: New test. * gdb.base/prelink.c, gdb.base/prelink-lib.c: New sources.
Diffstat (limited to 'gdb/testsuite/gdb.base/prelink.c')
-rw-r--r--gdb/testsuite/gdb.base/prelink.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/prelink.c b/gdb/testsuite/gdb.base/prelink.c
new file mode 100644
index 0000000..c63d35b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/prelink.c
@@ -0,0 +1,30 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include <stdio.h>
+
+extern void (*h (void)) (void (*)(void));
+
+int
+main (void)
+{
+ void (*f) (void (*)(void)) = h ();
+ printf ("%p\n", f);
+ f (0);
+}