aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <>2003-05-23 00:00:07 +0000
committernobody <>2003-05-23 00:00:07 +0000
commitaf7442372ae9e9e0f288086e46d4cc70d3da1024 (patch)
treecd841c3025750a1d78d156493f2a534badadc5e2
parent3b246c09d7eda95c2f3cdfa3edd4b633850bbdd1 (diff)
This commit was manufactured by cvs2svn to create tagcarlton_dictionary-20030523-merge
'carlton_dictionary-20030523-merge'. Sprout from cagney_fileio-20030521-branch 2003-05-21 19:52:40 UTC nobody 'This commit was manufactured by cvs2svn to create branch' Cherrypick from master 2003-05-23 00:00:06 UTC Alan Modra <amodra@gmail.com> 'daily update': ChangeLog Makefile.in Makefile.tpl bfd/ChangeLog bfd/elf64-mips.c bfd/elfn32-mips.c bfd/elfxx-mips.c bfd/som.h bfd/version.h configure gdb/ChangeLog gdb/config/pa/tm-hppah.h gdb/disasm.c gdb/dummy-frame.c gdb/dwarf2expr.c gdb/dwarf2loc.c gdb/findvar.c gdb/frame.c gdb/hppa-tdep.c gdb/infptrace.c gdb/stack.c gdb/testsuite/ChangeLog gdb/testsuite/gdb.base/corefile.exp gdb/version.in
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.in3
-rw-r--r--Makefile.tpl3
-rw-r--r--bfd/ChangeLog22
-rw-r--r--bfd/elf64-mips.c39
-rw-r--r--bfd/elfn32-mips.c39
-rw-r--r--bfd/elfxx-mips.c102
-rw-r--r--bfd/som.h3
-rw-r--r--bfd/version.h2
-rwxr-xr-xconfigure2
-rw-r--r--gdb/ChangeLog27
-rw-r--r--gdb/config/pa/tm-hppah.h2
-rw-r--r--gdb/disasm.c2
-rw-r--r--gdb/dummy-frame.c2
-rw-r--r--gdb/dwarf2expr.c4
-rw-r--r--gdb/dwarf2loc.c4
-rw-r--r--gdb/findvar.c2
-rw-r--r--gdb/frame.c2
-rw-r--r--gdb/hppa-tdep.c57
-rw-r--r--gdb/infptrace.c4
-rw-r--r--gdb/stack.c5
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp2
-rw-r--r--gdb/version.in2
24 files changed, 259 insertions, 87 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c21e6ae9df..6f0b06e6458 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-21 DJ Delorie <dj@redhat.com>
+
+ * Makefile.tpl (configure-target-libiberty): Depend only on gcc, not
+ newlib or libgloss.
+ * Makefile.in: Regenerate.
+
+2003-05-21 DJ Delorie <dj@redhat.com>
+
+ * Makefile.tpl: Add missing empty maybe-check-gcc target.
+ * Makefile.in: Regenerate.
+
2003-05-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* configure.in: Use curly braces in the definition of tooldir.
diff --git a/Makefile.in b/Makefile.in
index a98c0997077..7511bc057af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7817,6 +7817,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
LANGUAGES="c c++" all
.PHONY: check-gcc
+maybe-check-gcc:
check-gcc:
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD}`; export r; \
@@ -7980,7 +7981,7 @@ configure-target-zlib: $(ALL_GCC_C)
configure-target-examples: $(ALL_GCC_C)
configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC_C)
+configure-target-libiberty: $(ALL_GCC)
configure-target-libtermcap: $(ALL_GCC_C)
configure-target-newlib: $(ALL_GCC)
configure-target-rda: $(ALL_GCC_C)
diff --git a/Makefile.tpl b/Makefile.tpl
index f0f596841be..c07fed66392 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1270,6 +1270,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
LANGUAGES="c c++" all
.PHONY: check-gcc
+maybe-check-gcc:
check-gcc:
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD}`; export r; \
@@ -1433,7 +1434,7 @@ configure-target-zlib: $(ALL_GCC_C)
configure-target-examples: $(ALL_GCC_C)
configure-target-libgloss: $(ALL_GCC)
all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC_C)
+configure-target-libiberty: $(ALL_GCC)
configure-target-libtermcap: $(ALL_GCC_C)
configure-target-newlib: $(ALL_GCC)
configure-target-rda: $(ALL_GCC_C)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4b44b409ad2..14f90db7c0f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,25 @@
+2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
+ R_MIPS_GNU_REL16_S2 support.
+ (bfd_elf64_bfd_reloc_type_lookup): Use it.
+ (mips_elf64_rtype_to_howto): Use it.
+ * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
+ R_MIPS_GNU_REL16_S2 support.
+ (bfd_elf32_bfd_reloc_type_lookup): Use it.
+ (mips_elf_n32_rtype_to_howto): Use it.
+
+2003-05-21 Stuart F. Downing <sdowning@fame.com>
+
+ * som.h: Define PA_2_0 before including a.out.h
+
+2003-05-07 Eric Christopher <echristo@redhat.com>
+ Alexandre Oliva <aoliva@redhat.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
+ pic tests, change to warning.
+ (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
+
2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
* config.bfd: Check for a target triplet of shl-...-netbsdelf as
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 6e7321cacc6..a43b3da9f70 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1227,6 +1227,38 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto =
0, /* dst_mask */
FALSE); /* pcrel_offset */
+/* 16 bit offset for pc-relative branches. */
+static reloc_howto_type elf_mips_gnu_rel16_s2 =
+ HOWTO (R_MIPS_GNU_REL16_S2, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_GNU_REL16_S2", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ TRUE); /* pcrel_offset */
+
+/* 16 bit offset for pc-relative branches. */
+static reloc_howto_type elf_mips_gnu_rela16_s2 =
+ HOWTO (R_MIPS_GNU_REL16_S2, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_MIPS_GNU_REL16_S2", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ TRUE); /* pcrel_offset */
+
/* Swap in a MIPS 64-bit Rel reloc. */
static void
@@ -1960,6 +1992,8 @@ bfd_elf64_bfd_reloc_type_lookup (abfd, code)
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
+ case BFD_RELOC_16_PCREL_S2:
+ return &elf_mips_gnu_rela16_s2;
default:
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1983,6 +2017,11 @@ mips_elf64_rtype_to_howto (r_type, rela_p)
return &elf_mips_gnu_vtinherit_howto;
case R_MIPS_GNU_VTENTRY:
return &elf_mips_gnu_vtentry_howto;
+ case R_MIPS_GNU_REL16_S2:
+ if (rela_p)
+ return &elf_mips_gnu_rela16_s2;
+ else
+ return &elf_mips_gnu_rel16_s2;
default:
BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
if (rela_p)
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index ab255fa6974..2e499488821 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -1199,6 +1199,38 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto =
0, /* dst_mask */
FALSE); /* pcrel_offset */
+/* 16 bit offset for pc-relative branches. */
+static reloc_howto_type elf_mips_gnu_rel16_s2 =
+ HOWTO (R_MIPS_GNU_REL16_S2, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GNU_REL16_S2", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ TRUE); /* pcrel_offset */
+
+/* 16 bit offset for pc-relative branches. */
+static reloc_howto_type elf_mips_gnu_rela16_s2 =
+ HOWTO (R_MIPS_GNU_REL16_S2, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GNU_REL16_S2", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ TRUE); /* pcrel_offset */
+
/* This is derived from bfd_elf_generic_reloc. NewABI allows us to have
several relocations against the same address. The addend is derived
from the addends of preceding relocations. If we don't need to
@@ -1897,6 +1929,8 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
return &elf_mips_gnu_vtinherit_howto;
case BFD_RELOC_VTABLE_ENTRY:
return &elf_mips_gnu_vtentry_howto;
+ case BFD_RELOC_16_PCREL_S2:
+ return &elf_mips_gnu_rela16_s2;
default:
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1920,6 +1954,11 @@ mips_elf_n32_rtype_to_howto (r_type, rela_p)
return &elf_mips_gnu_vtinherit_howto;
case R_MIPS_GNU_VTENTRY:
return &elf_mips_gnu_vtentry_howto;
+ case R_MIPS_GNU_REL16_S2:
+ if (rela_p)
+ return &elf_mips_gnu_rela16_s2;
+ else
+ return &elf_mips_gnu_rel16_s2;
default:
BFD_ASSERT (r_type < (unsigned int) R_MIPS_max);
if (rela_p)
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 72516f71f1c..4199ff7064f 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -163,8 +163,7 @@ struct mips_elf_hash_sort_data
long min_got_dynindx;
/* The greatest dynamic symbol table index corresponding to a symbol
with a GOT entry that is not referenced (e.g., a dynamic symbol
- with dynamic relocations pointing to it from non-primary
- GOTs). */
+ with dynamic relocations pointing to it from non-primary GOTs). */
long max_unref_got_dynindx;
/* The greatest dynamic symbol table index not corresponding to a
symbol without a GOT entry. */
@@ -246,8 +245,7 @@ struct mips_elf_link_hash_table
struct extsym_info
{
- bfd *abfd;
- struct bfd_link_info *info;
+ bfd *abfd; struct bfd_link_info *info;
struct ecoff_debug_info *debug;
const struct ecoff_debug_swap *swap;
bfd_boolean failed;
@@ -1719,15 +1717,15 @@ mips_elf_get_global_gotsym_index (abfd)
if (abfd == NULL)
return 0;
-
+
sgot = mips_elf_got_section (abfd, TRUE);
if (sgot == NULL || mips_elf_section_data (sgot) == NULL)
return 0;
-
+
g = mips_elf_section_data (sgot)->u.got_info;
if (g == NULL || g->global_gotsym == NULL)
return 0;
-
+
return g->global_gotsym->dynindx;
}
@@ -1770,7 +1768,7 @@ mips_elf_global_got_index (abfd, ibfd, h)
if (g->bfd2got && ibfd)
{
struct mips_got_entry e, *p;
-
+
BFD_ASSERT (h->dynindx >= 0);
g = mips_elf_got_for_ibfd (g, ibfd);
@@ -1828,7 +1826,7 @@ mips_elf_got_page (abfd, ibfd, info, value, offsetp)
if (!entry)
return MINUS_ONE;
-
+
index = entry->gotidx;
if (offsetp)
@@ -1886,7 +1884,7 @@ mips_elf_got_offset_from_index (dynobj, output_bfd, input_bfd, index)
g = mips_elf_got_info (dynobj, &sgot);
gp = _bfd_get_gp_value (output_bfd)
+ mips_elf_adjust_gp (output_bfd, g, input_bfd);
-
+
return sgot->output_section->vma + sgot->output_offset + index - gp;
}
@@ -1918,14 +1916,14 @@ mips_elf_create_local_got_entry (abfd, ibfd, gg, sgot, value)
INSERT);
if (*loc)
return *loc;
-
+
entry.gotidx = MIPS_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
*loc = (struct mips_got_entry *)bfd_alloc (abfd, sizeof entry);
if (! *loc)
return NULL;
-
+
memcpy (*loc, &entry, sizeof entry);
if (g->assigned_gotno >= g->local_gotno)
@@ -1965,7 +1963,7 @@ mips_elf_sort_hash_table (info, max_local)
g = mips_elf_got_info (dynobj, NULL);
hsd.low = NULL;
- hsd.max_unref_got_dynindx =
+ hsd.max_unref_got_dynindx =
hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount
/* In the multi-got case, assigned_gotno of the master got_info
indicate the number of entries that aren't referenced in the
@@ -2079,7 +2077,7 @@ mips_elf_record_global_got_symbol (h, abfd, info, g)
if (! *loc)
return FALSE;
-
+
entry.gotidx = -1;
memcpy (*loc, &entry, sizeof entry);
@@ -2121,7 +2119,7 @@ mips_elf_record_local_got_symbol (abfd, symndx, addend, g)
if (! *loc)
return FALSE;
-
+
memcpy (*loc, &entry, sizeof entry);
return TRUE;
@@ -2187,7 +2185,7 @@ mips_elf_make_got_per_bfd (entryp, p)
struct mips_got_info *g;
struct mips_elf_bfd2got_hash bfdgot_entry, *bfdgot;
void **bfdgotp;
-
+
/* Find the got_info for this GOT entry's input bfd. Create one if
none exists. */
bfdgot_entry.bfd = entry->abfd;
@@ -2239,7 +2237,7 @@ mips_elf_make_got_per_bfd (entryp, p)
entryp = htab_find_slot (g->got_entries, entry, INSERT);
if (*entryp != NULL)
return 1;
-
+
*entryp = entry;
if (entry->symndx >= 0 || entry->d.h->forced_local)
@@ -2268,7 +2266,7 @@ mips_elf_merge_gots (bfd2got_, p)
unsigned int lcount = bfd2got->g->local_gotno;
unsigned int gcount = bfd2got->g->global_gotno;
unsigned int maxcnt = arg->max_count;
-
+
/* If we don't have a primary GOT and this is not too big, use it as
a starting point for the primary GOT. */
if (! arg->primary && lcount + gcount <= maxcnt)
@@ -2336,7 +2334,7 @@ mips_elf_merge_gots (bfd2got_, p)
{
bfd2got->g->next = arg->current;
arg->current = bfd2got->g;
-
+
arg->current_count = lcount + gcount;
}
@@ -2417,7 +2415,7 @@ mips_elf_resolve_final_got_entry (entryp, p)
if (entry->d.h == h)
return 1;
-
+
entry->d.h = h;
/* If we can't find this entry with the new bfd hash, re-insert
@@ -2437,7 +2435,7 @@ mips_elf_resolve_final_got_entry (entryp, p)
/* We might want to decrement the global_gotno count, but it's
either too early or too late for that at this point. */
}
-
+
return 1;
}
@@ -2478,7 +2476,7 @@ mips_elf_adjust_gp (abfd, g, ibfd)
BFD_ASSERT (g->next);
g = g->next;
-
+
return (g->local_gotno + g->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
}
@@ -2566,7 +2564,7 @@ mips_elf_multi_got (abfd, info, g, got, pages)
{
struct mips_elf_bfd2got_hash *bfdgot;
void **bfdgotp;
-
+
bfdgot = (struct mips_elf_bfd2got_hash *)bfd_alloc
(abfd, sizeof (struct mips_elf_bfd2got_hash));
@@ -2592,7 +2590,7 @@ mips_elf_multi_got (abfd, info, g, got, pages)
the cache. Also, knowing that every external symbol has a GOT
helps speed up the resolution of local symbols too, so GNU/Linux
follows IRIX's practice.
-
+
The number 2 is used by mips_elf_sort_hash_table_f to count
global GOT symbols that are unreferenced in the primary GOT, with
an initial dynamic index computed from gg->assigned_gotno, where
@@ -2665,10 +2663,10 @@ mips_elf_multi_got (abfd, info, g, got, pages)
got->_raw_size = (gg->next->local_gotno
+ gg->next->global_gotno) * MIPS_ELF_GOT_SIZE (abfd);
-
+
return TRUE;
}
-
+
/* Returns the first relocation of type r_type found, beginning with
RELOCATION. RELEND is one-past-the-end of the relocation table. */
@@ -5370,12 +5368,12 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs)
{
struct mips_elf_link_hash_entry *hmips =
(struct mips_elf_link_hash_entry *) h;
-
+
while (hmips->root.root.type == bfd_link_hash_indirect
|| hmips->root.root.type == bfd_link_hash_warning)
hmips = (struct mips_elf_link_hash_entry *)
hmips->root.root.u.i.link;
-
+
if ((hmips->root.root.type == bfd_link_hash_defined
|| hmips->root.root.type == bfd_link_hash_defweak)
&& hmips->root.root.u.def.section
@@ -5599,7 +5597,7 @@ _bfd_mips_relax_section (abfd, sec, link_info, again)
while (h->root.root.type == bfd_link_hash_indirect
|| h->root.root.type == bfd_link_hash_warning)
h = (struct mips_elf_link_hash_entry *) h->root.root.u.i.link;
-
+
/* If a symbol is undefined, or if it may be overridden,
skip it. */
if (! ((h->root.root.type == bfd_link_hash_defined
@@ -5662,7 +5660,7 @@ _bfd_mips_relax_section (abfd, sec, link_info, again)
/* Check that it's in range. */
if (sym_offset < -0x8000 || sym_offset >= 0x8000)
continue;
-
+
/* Get the section contents if we haven't done so already. */
if (contents == NULL)
{
@@ -5711,7 +5709,7 @@ _bfd_mips_relax_section (abfd, sec, link_info, again)
}
return TRUE;
- relax_return:
+ relax_return:
if (free_contents != NULL)
free (free_contents);
return FALSE;
@@ -5857,7 +5855,7 @@ _bfd_mips_elf_always_size_sections (output_bfd, info)
if (dynobj == NULL)
/* Relocatable links don't have it. */
return TRUE;
-
+
g = mips_elf_got_info (dynobj, &s);
if (s == NULL)
return TRUE;
@@ -6022,7 +6020,7 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
struct mips_got_info *g = gg;
struct mips_elf_set_global_got_offset_arg set_got_offset_arg;
unsigned int needed_relocs = 0;
-
+
if (gg->next)
{
set_got_offset_arg.value = MIPS_ELF_GOT_SIZE (output_bfd);
@@ -6782,7 +6780,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
e.abfd = output_bfd;
e.symndx = -1;
e.d.h = (struct mips_elf_link_hash_entry *)h;
-
+
if (info->shared
|| h->root.type == bfd_link_hash_undefined
|| h->root.type == bfd_link_hash_undefweak)
@@ -8380,17 +8378,6 @@ _bfd_mips_elf_final_link (abfd, info)
scRData, scSData, scSBss, scBss
};
- /* If all the things we linked together were PIC, but we're
- producing an executable (rather than a shared object), then the
- resulting file is CPIC (i.e., it calls PIC code.) */
- if (!info->shared
- && !info->relocateable
- && elf_elfheader (abfd)->e_flags & EF_MIPS_PIC)
- {
- elf_elfheader (abfd)->e_flags &= ~EF_MIPS_PIC;
- elf_elfheader (abfd)->e_flags |= EF_MIPS_CPIC;
- }
-
/* We'd carefully arranged the dynamic symbol indices, and then the
generic size_dynamic_sections renumbered them out from under us.
Rather than trying somehow to prevent the renumbering, just do
@@ -9250,25 +9237,22 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
ok = TRUE;
- if ((new_flags & EF_MIPS_PIC) != (old_flags & EF_MIPS_PIC))
+ if (((new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0)
+ != ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0))
{
- new_flags &= ~EF_MIPS_PIC;
- old_flags &= ~EF_MIPS_PIC;
(*_bfd_error_handler)
- (_("%s: linking PIC files with non-PIC files"),
+ (_("%s: warning: linking PIC files with non-PIC files"),
bfd_archive_filename (ibfd));
- ok = FALSE;
+ ok = TRUE;
}
- if ((new_flags & EF_MIPS_CPIC) != (old_flags & EF_MIPS_CPIC))
- {
- new_flags &= ~EF_MIPS_CPIC;
- old_flags &= ~EF_MIPS_CPIC;
- (*_bfd_error_handler)
- (_("%s: linking abicalls files with non-abicalls files"),
- bfd_archive_filename (ibfd));
- ok = FALSE;
- }
+ if (new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC))
+ elf_elfheader (obfd)->e_flags |= EF_MIPS_CPIC;
+ if (! (new_flags & EF_MIPS_PIC))
+ elf_elfheader (obfd)->e_flags &= ~EF_MIPS_PIC;
+
+ new_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
+ old_flags &= ~ (EF_MIPS_PIC | EF_MIPS_CPIC);
/* Compare the ISAs. */
if (mips_32bit_flags_p (old_flags) != mips_32bit_flags_p (new_flags))
diff --git a/bfd/som.h b/bfd/som.h
index 12ac66678bb..20b8a816d92 100644
--- a/bfd/som.h
+++ b/bfd/som.h
@@ -27,6 +27,9 @@
#include "libhppa.h"
+/* Enable PA2.0 if available */
+#define PA_2_0
+
#include <a.out.h>
#include <lst.h>
#include <ar.h>
diff --git a/bfd/version.h b/bfd/version.h
index 0e173863959..f9de765b097 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030521
+#define BFD_VERSION_DATE 20030523
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/configure b/configure
index fa3d44f80ec..e0d5acfb6b2 100755
--- a/configure
+++ b/configure
@@ -1958,7 +1958,7 @@ fi
# Some systems (e.g., one of the i386-aix systems the gas testers are
# using) don't handle "\$" correctly, so don't use it here.
-tooldir='$(exec_prefix)'/${target_alias}
+tooldir='${exec_prefix}'/${target_alias}
build_tooldir=${tooldir}
# Generate a default definition for YACC. This is used if the makefile can't
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9cf50e6ec02..d81f24f2656 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,30 @@
+2003-05-22 Ian Lance Taylor <ian@airs.com>
+
+ * disasm.c (gdb_disassemble_info): Initialize disassemble_info
+ with fprintf_filtered, not fprintf_unfiltered.
+
+2003-05-22 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (frame_info): Inline extract_address, replacing it with
+ extract_unsigned_integer.
+ * findvar.c (unsigned_pointer_to_address): Ditto.
+ * dwarf2loc.c (dwarf_expr_read_reg): Ditto.
+ * dwarf2expr.c (dwarf2_read_address): Ditto.
+ * frame.c (frame_pc_unwind): Update comment.
+ * dummy-frame.c (deprecated_read_register_dummy): Update comment.
+
+2003-05-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * infptrace.c (detach): Call print_sys_errmsg rather than
+ perror_with_name to issue warning message when errno is non-zero
+ after calling ptrace detach.
+
+2003-05-21 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/tm-hppa.h: Delete some unused macros. Move some
+ macro definitions from here...
+ * hppa-tdep.c: ...to there.
+
2003-05-20 Kevin Buettner <kevinb@redhat.com>
* mips-nat.c (REGISTER_PTRACE_ADDR): Convert macro to function
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 070c83ce514..290f752d0a3 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -35,8 +35,10 @@ struct frame_info;
#include "somsolib.h"
#endif
+#if !GDB_MULTI_ARCH
extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
+#endif
extern void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
CORE_ADDR *tmp);
diff --git a/gdb/disasm.c b/gdb/disasm.c
index c8a2029bae8..553ca1cfc00 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -315,7 +315,7 @@ gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
{
disassemble_info di;
INIT_DISASSEMBLE_INFO_NO_ARCH (di, file,
- (fprintf_ftype) fprintf_unfiltered);
+ (fprintf_ftype) fprintf_filtered);
di.flavour = bfd_target_unknown_flavour;
di.memory_error_func = dis_asm_memory_error;
di.print_address_func = dis_asm_print_address;
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index ca11bd675f0..94413f4baef 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -183,7 +183,7 @@ deprecated_read_register_dummy (CORE_ADDR pc, CORE_ADDR fp, int regno)
/* NOTE: cagney/2002-08-12: Replaced a call to
regcache_raw_read_as_address() with a call to
regcache_cooked_read_unsigned(). The old, ...as_address
- function was eventually calling extract_unsigned_integer (via
+ function was eventually calling extract_unsigned_integer (nee
extract_address) to unpack the registers value. The below is
doing an unsigned extract so that it is functionally
equivalent. The read needs to be cooked as, otherwise, it
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 410cd54c622..aa391ebd6a5 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -178,7 +178,9 @@ dwarf2_read_address (unsigned char *buf, unsigned char *buf_end, int *bytes_read
error ("dwarf2_read_address: Corrupted DWARF expression.");
*bytes_read = TARGET_ADDR_BIT / TARGET_CHAR_BIT;
- result = extract_address (buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
+ /* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2
+ address is always unsigned. That may or may not be true. */
+ result = extract_unsigned_integer (buf, TARGET_ADDR_BIT / TARGET_CHAR_BIT);
return result;
}
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 2bb4f268a0b..9ed6b7e9665 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -124,7 +124,9 @@ dwarf_expr_read_reg (void *baton, int dwarf_regnum)
frame_register (debaton->frame, regnum, &optimized, &lval_type, &save_addr,
&realnum, buf);
- result = extract_address (buf, regsize);
+ /* NOTE: cagney/2003-05-22: This extract is assuming that a DWARF 2
+ address is always unsigned. That may or may not be true. */
+ result = extract_unsigned_integer (buf, regsize);
return result;
}
diff --git a/gdb/findvar.c b/gdb/findvar.c
index c9623bf2c4d..5d975e43c85 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -333,7 +333,7 @@ value_of_register (int regnum, struct frame_info *frame)
CORE_ADDR
unsigned_pointer_to_address (struct type *type, const void *buf)
{
- return extract_address (buf, TYPE_LENGTH (type));
+ return extract_unsigned_integer (buf, TYPE_LENGTH (type));
}
CORE_ADDR
diff --git a/gdb/frame.c b/gdb/frame.c
index fe863d69d33..07e0e5b15b6 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -376,7 +376,7 @@ frame_pc_unwind (struct frame_info *this_frame)
implementation is no more than:
frame_unwind_register (this_frame, ISA_PC_REGNUM, buf);
- return extract_address (buf, size of ISA_PC_REGNUM);
+ return extract_unsigned_integer (buf, size of ISA_PC_REGNUM);
Note: this method is very heavily dependent on a correct
register-unwind implementation, it pays to fix that
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index e8d62db6579..1f78d06d164 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -68,11 +68,33 @@
/* Some local constants. */
static const int hppa_num_regs = 128;
+/* Get at various relevent fields of an instruction word. */
+#define MASK_5 0x1f
+#define MASK_11 0x7ff
+#define MASK_14 0x3fff
+#define MASK_21 0x1fffff
+
+/* Define offsets into the call dummy for the target function address.
+ See comments related to CALL_DUMMY for more info. */
+#define FUNC_LDIL_OFFSET (INSTRUCTION_SIZE * 9)
+#define FUNC_LDO_OFFSET (INSTRUCTION_SIZE * 10)
+
+/* Define offsets into the call dummy for the _sr4export address.
+ See comments related to CALL_DUMMY for more info. */
+#define SR4EXPORT_LDIL_OFFSET (INSTRUCTION_SIZE * 12)
+#define SR4EXPORT_LDO_OFFSET (INSTRUCTION_SIZE * 13)
+
/* To support detection of the pseudo-initial frame
that threads have. */
#define THREAD_INITIAL_FRAME_SYMBOL "__pthread_exit"
#define THREAD_INITIAL_FRAME_SYM_LEN sizeof(THREAD_INITIAL_FRAME_SYMBOL)
+/* Sizes (in bytes) of the native unwind entries. */
+#define UNWIND_ENTRY_SIZE 16
+#define STUB_UNWIND_ENTRY_SIZE 8
+
+static int get_field (unsigned word, int from, int to);
+
static int extract_5_load (unsigned int);
static unsigned extract_5R_store (unsigned int);
@@ -224,6 +246,15 @@ low_sign_extend (unsigned val, unsigned bits)
return (int) ((val & 0x1 ? (-1 << (bits - 1)) : 0) | val >> 1);
}
+/* Extract the bits at positions between FROM and TO, using HP's numbering
+ (MSB = 0). */
+
+static int
+get_field (unsigned word, int from, int to)
+{
+ return ((word) >> (31 - (to)) & ((1 << ((to) - (from) + 1)) - 1));
+}
+
/* extract the immediate field from a ld{bhw}s instruction */
static int
@@ -275,15 +306,15 @@ extract_21 (unsigned word)
word &= MASK_21;
word <<= 11;
- val = GET_FIELD (word, 20, 20);
+ val = get_field (word, 20, 20);
val <<= 11;
- val |= GET_FIELD (word, 9, 19);
+ val |= get_field (word, 9, 19);
val <<= 2;
- val |= GET_FIELD (word, 5, 6);
+ val |= get_field (word, 5, 6);
val <<= 5;
- val |= GET_FIELD (word, 0, 4);
+ val |= get_field (word, 0, 4);
val <<= 2;
- val |= GET_FIELD (word, 7, 8);
+ val |= get_field (word, 7, 8);
return sign_extend (val, 21) << 11;
}
@@ -296,15 +327,15 @@ deposit_21 (unsigned opnd, unsigned word)
{
unsigned val = 0;
- val |= GET_FIELD (opnd, 11 + 14, 11 + 18);
+ val |= get_field (opnd, 11 + 14, 11 + 18);
val <<= 2;
- val |= GET_FIELD (opnd, 11 + 12, 11 + 13);
+ val |= get_field (opnd, 11 + 12, 11 + 13);
val <<= 2;
- val |= GET_FIELD (opnd, 11 + 19, 11 + 20);
+ val |= get_field (opnd, 11 + 19, 11 + 20);
val <<= 11;
- val |= GET_FIELD (opnd, 11 + 1, 11 + 11);
+ val |= get_field (opnd, 11 + 1, 11 + 11);
val <<= 1;
- val |= GET_FIELD (opnd, 11 + 0, 11 + 0);
+ val |= get_field (opnd, 11 + 0, 11 + 0);
return word | val;
}
@@ -314,9 +345,9 @@ deposit_21 (unsigned opnd, unsigned word)
static int
extract_17 (unsigned word)
{
- return sign_extend (GET_FIELD (word, 19, 28) |
- GET_FIELD (word, 29, 29) << 10 |
- GET_FIELD (word, 11, 15) << 11 |
+ return sign_extend (get_field (word, 19, 28) |
+ get_field (word, 29, 29) << 10 |
+ get_field (word, 11, 15) << 11 |
(word & 0x1) << 16, 17) << 2;
}
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index 1225dd8a62c..6147cbe8964 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -301,8 +301,8 @@ detach (int signal)
errno = 0;
ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
signal);
- if (errno && errno != ESRCH)
- perror_with_name ("ptrace");
+ if (errno)
+ print_sys_errmsg ("ptrace", errno);
attach_flag = 0;
}
#endif /* ATTACH_DETACH */
diff --git a/gdb/stack.c b/gdb/stack.c
index e865270a812..a0bd7a4ae68 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -818,7 +818,10 @@ frame_info (char *addr_exp, int from_tty)
CORE_ADDR sp;
frame_register_unwind (fi, SP_REGNUM, &optimized, &lval, &addr,
&realnum, value);
- sp = extract_address (value, REGISTER_RAW_SIZE (SP_REGNUM));
+ /* NOTE: cagney/2003-05-22: This is assuming that the
+ stack pointer was packed as an unsigned integer. That
+ may or may not be valid. */
+ sp = extract_unsigned_integer (value, REGISTER_RAW_SIZE (SP_REGNUM));
printf_filtered (" Previous frame's sp is ");
print_address_numeric (sp, 1, gdb_stdout);
printf_filtered ("\n");
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8f118767d4d..f0e5d82102c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-22 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/corefile.exp: Tolerate stuff after argument parens in
+ backtrace.
+
2003-05-20 David Carlton <carlton@math.stanford.edu>
* gdb.c++/namespace1.cc: Actually do 'cvs add' before committing
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index e25c03c2ea6..73217775e0d 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -227,6 +227,6 @@ gdb_expect {
gdb_load ${binfile}
setup_xfail "*-*-*" CLLbs17002
-gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\)" "up in corefile.exp (reinit)"
+gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp (reinit)"
gdb_test "core" "No core file now."
diff --git a/gdb/version.in b/gdb/version.in
index 8379ea398ec..0729879472b 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-05-21-cvs
+2003-05-23-cvs