aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-rs6000.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@geoffk.org>2000-09-06 21:21:51 +0000
committerGeoffrey Keating <geoffk@geoffk.org>2000-09-06 21:21:51 +0000
commit492055e63351f3e50634e94b60bb146ede9a537b (patch)
treee88a93bda19b367ce78974e97c58d25a07a21ebd /bfd/coff-rs6000.c
parent566ad7d7ea28f14f3c005daaa916a437e2a60e93 (diff)
downloadgdb-492055e63351f3e50634e94b60bb146ede9a537b.zip
gdb-492055e63351f3e50634e94b60bb146ede9a537b.tar.gz
gdb-492055e63351f3e50634e94b60bb146ede9a537b.tar.bz2
* xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
pseduo-section when determining where the TOC ends. * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to output x_tvndx as it is only two bytes wide. * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute reloc is 26 or 32 bits wide. * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant for relocs that don't change anything. Also look at the full 6 bits of bitsize.
Diffstat (limited to 'bfd/coff-rs6000.c')
-rw-r--r--bfd/coff-rs6000.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index dec690c..bd93059 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -373,7 +373,7 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
}
PUTWORD(abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx);
- PUTWORD(abfd, in->x_sym.x_tvndx , (bfd_byte *) ext->x_sym.x_tvndx);
+ bfd_h_put_16 (abfd, in->x_sym.x_tvndx , (bfd_byte *) ext->x_sym.x_tvndx);
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
{
@@ -708,7 +708,7 @@ reloc_howto_type xcoff_howto_table[] =
HOWTO (0x18, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 26, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
@@ -723,7 +723,7 @@ reloc_howto_type xcoff_howto_table[] =
HOWTO (0x19, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 32, /* bitsize */
false, /* pc_relative */
0, /* bitpos */
complain_overflow_bitfield, /* complain_on_overflow */
@@ -843,8 +843,11 @@ _bfd_xcoff_rtype2howto (relent, internal)
/* The r_size field of an XCOFF reloc encodes the bitsize of the
relocation, as well as indicating whether it is signed or not.
Doublecheck that the relocation information gathered from the
- type matches this information. */
- if (relent->howto->bitsize != ((unsigned int) internal->r_size & 0x1f) + 1)
+ type matches this information. The bitsize is not significant
+ for R_REF relocs. */
+ if (relent->howto->dst_mask != 0
+ && (relent->howto->bitsize
+ != ((unsigned int) internal->r_size & 0x3f) + 1))
abort ();
#if 0
if ((internal->r_size & 0x80) != 0