mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
Remove U suffix from constants for K&R compilers.
Fix a couple of 64 bit nits.
This commit is contained in:
parent
3db10f32e0
commit
fc633e5b97
@ -1,3 +1,19 @@
|
||||
2000-04-13 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* elf32-hppa.h: Update copyright date.
|
||||
|
||||
* elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
|
||||
* elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
|
||||
|
||||
* elf32-d30v.c (MAX32): Don't use LL suffix.
|
||||
(MIN32): Define in terms of MAX32.
|
||||
(bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
|
||||
|
||||
* coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
|
||||
expression.
|
||||
|
||||
* peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
|
||||
|
||||
2000-04-12 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* dep-in.sed: Match space before file name, not after.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* BFD back-end for AMD 29000 COFF binaries.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 97, 98, 1999
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 97, 98, 99, 2000
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by David Wood at New York University 7/8/91.
|
||||
|
||||
@ -43,9 +43,9 @@ static boolean coff_a29k_adjust_symndx
|
||||
#define INSERT_HWORD(WORD,HWORD) \
|
||||
(((WORD) & 0xff00ff00) | (((HWORD) & 0xff00) << 8) | ((HWORD)& 0xff))
|
||||
#define EXTRACT_HWORD(WORD) \
|
||||
((((WORD) & 0x00ff0000) >> 8) | ((WORD)& 0xff))
|
||||
((((WORD) & 0x00ff0000) >> 8) | ((WORD) & 0xff))
|
||||
#define SIGN_EXTEND_HWORD(HWORD) \
|
||||
((HWORD) & 0x8000 ? (HWORD)|(~0xffffL) : (HWORD))
|
||||
(((HWORD) ^ 0x8000) - 0x8000)
|
||||
|
||||
/* Provided the symbol, returns the value reffed */
|
||||
static long
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* D30V-specific support for 32-bit ELF
|
||||
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 98, 99, 2000 Free Software Foundation, Inc.
|
||||
Contributed by Martin Hunt (hunt@cygnus.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -263,8 +263,8 @@ static reloc_howto_type elf_d30v_howto_table[] =
|
||||
|
||||
};
|
||||
|
||||
#define MIN32 (long long)0xffffffff80000000LL
|
||||
#define MAX32 0x7fffffffLL
|
||||
#define MAX32 ((bfd_signed_vma) 0x7fffffff)
|
||||
#define MIN32 (- MAX32 - 1)
|
||||
|
||||
static bfd_reloc_status_type
|
||||
bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message)
|
||||
@ -276,7 +276,7 @@ bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
||||
bfd *output_bfd;
|
||||
char **error_message;
|
||||
{
|
||||
long long relocation;
|
||||
bfd_signed_vma relocation;
|
||||
bfd_vma in1, in2, num;
|
||||
bfd_vma tmp_addr = 0;
|
||||
bfd_reloc_status_type r;
|
||||
@ -360,15 +360,10 @@ bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
||||
|
||||
if (howto->pc_relative == true && howto->bitsize == 32)
|
||||
{
|
||||
/* the D30V has a PC that doesn't wrap and PC-relative jumps */
|
||||
/* are signed, so a PC-relative jump can'tbe more than +/- 2^31 byrtes */
|
||||
/* if one exceeds this, change it to an absolute jump */
|
||||
if (relocation > MAX32)
|
||||
{
|
||||
relocation = (relocation + tmp_addr) & 0xffffffff;
|
||||
make_absolute = 1;
|
||||
}
|
||||
else if (relocation < MIN32)
|
||||
/* The D30V has a PC that doesn't wrap and PC-relative jumps are
|
||||
signed, so a PC-relative jump can't be more than +/- 2^31 bytes.
|
||||
If one exceeds this, change it to an absolute jump. */
|
||||
if (relocation > MAX32 || relocation < MIN32)
|
||||
{
|
||||
relocation = (relocation + tmp_addr) & 0xffffffff;
|
||||
make_absolute = 1;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* FR30-specific support for 32-bit ELF.
|
||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -275,7 +275,7 @@ fr30_elf_i20_reloc (abfd, reloc_entry, symbol, data,
|
||||
+ symbol->section->output_offset
|
||||
+ reloc_entry->addend;
|
||||
|
||||
if (relocation > ((1U << 20) - 1))
|
||||
if (relocation > (((bfd_vma) 1 << 20) - 1))
|
||||
return bfd_reloc_overflow;
|
||||
|
||||
x = bfd_get_32 (abfd, data + reloc_entry->address);
|
||||
|
@ -4,7 +4,8 @@
|
||||
in the Stratus FTX/Golf Object File Format (SED-1762) dated
|
||||
February 1994.
|
||||
|
||||
Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 98, 99, 2000
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by:
|
||||
|
||||
|
@ -6739,8 +6739,8 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_vma low_bits;
|
||||
bfd_vma high_bits;
|
||||
|
||||
if (addend & 0x80000000u)
|
||||
sign_bits = 0xffffffffu;
|
||||
if (addend & ((bfd_vma) 1 << 31))
|
||||
sign_bits = ((bfd_vma) 1 << 32) - 1;
|
||||
else
|
||||
sign_bits = 0;
|
||||
|
||||
@ -6859,8 +6859,8 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_vma low_bits;
|
||||
bfd_vma high_bits;
|
||||
|
||||
if (value & 0x80000000u)
|
||||
sign_bits = 0xffffffffu;
|
||||
if (value & ((bfd_vma) 1 << 31))
|
||||
sign_bits = ((bfd_vma) 1 << 32) - 1;
|
||||
else
|
||||
sign_bits = 0;
|
||||
|
||||
|
@ -905,8 +905,8 @@ pe_ILF_build_a_bfd (bfd * abfd,
|
||||
/* XXX - treat as IMPORT_NAME ??? */
|
||||
abort ();
|
||||
|
||||
* (unsigned int *) id4->contents = ordinal | 0x80000000UL;
|
||||
* (unsigned int *) id5->contents = ordinal | 0x80000000UL;
|
||||
* (unsigned int *) id4->contents = ordinal | 0x80000000;
|
||||
* (unsigned int *) id5->contents = ordinal | 0x80000000;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-04-13 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* config/tc-arm.c (md_apply_fix3): Don't use UL suffix on
|
||||
constants, and don't assume offsetT is 32 bits.
|
||||
|
||||
2000-04-12 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* config/tc-d10v.h: Include "write.h" to get definition of fixS.
|
||||
|
@ -5571,8 +5571,8 @@ md_apply_fix3 (fixP, val, seg)
|
||||
instruction, in a 24 bit, signed field. Thus we need to check
|
||||
that none of the top 8 bits of the shifted value (top 7 bits of
|
||||
the unshifted, unsigned value) are set, or that they are all set. */
|
||||
if ((value & 0xfe000000UL) != 0
|
||||
&& ((value & 0xfe000000UL) != 0xfe000000UL))
|
||||
if ((value & ~ ((offsetT) 0x1ffffff)) != 0
|
||||
&& ((value & ~ ((offsetT) 0x1ffffff)) != ~ ((offsetT) 0x1ffffff)))
|
||||
{
|
||||
#ifdef OBJ_ELF
|
||||
/* Normally we would be stuck at this point, since we cannot store
|
||||
@ -5595,8 +5595,8 @@ md_apply_fix3 (fixP, val, seg)
|
||||
|
||||
/* Permit a backward branch provided that enough bits are set.
|
||||
Allow a forwards branch, provided that enough bits are clear. */
|
||||
if ((value & 0xfe000000UL) == 0xfe000000UL
|
||||
|| (value & 0xfe000000UL) == 0)
|
||||
if ((value & ~ ((offsetT) 0x1ffffff)) == ~ ((offsetT) 0x1ffffff)
|
||||
|| (value & ~ ((offsetT) 0x1ffffff)) == 0)
|
||||
fixP->fx_done = 1;
|
||||
}
|
||||
|
||||
@ -5609,8 +5609,8 @@ md_apply_fix3 (fixP, val, seg)
|
||||
value >>= 2;
|
||||
value += SEXT24 (newval);
|
||||
|
||||
if ((value & 0xff000000UL) != 0
|
||||
&& ((value & 0xff000000UL) != 0xff000000UL))
|
||||
if ((value & ~ ((offsetT) 0xffffff)) != 0
|
||||
&& ((value & ~ ((offsetT) 0xffffff)) != ~ ((offsetT) 0xffffff)))
|
||||
as_bad_where (fixP->fx_file, fixP->fx_line,
|
||||
_("out of range branch"));
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-04-13 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* ti.h (ADDR_MASK): Don't use ul suffix on constants.
|
||||
(PG_MASK): Ditto.
|
||||
|
||||
2000-04-11 Timothy Wall <twall@cygnus.com>
|
||||
|
||||
* ti.h: Remove load page references until load pages are
|
||||
|
@ -252,10 +252,10 @@ PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
|
||||
|
||||
#define LONG_ADDRESSES 1
|
||||
#define PG_SHIFT (LONG_ADDRESSES ? 30 : 16)
|
||||
#define ADDR_MASK ((1ul<<PG_SHIFT)-1)/* 16 or 24-bit addresses */
|
||||
#define PG_MASK (3ul<<PG_SHIFT)
|
||||
#define PG_TO_FLAG(p) ((p)<<PG_SHIFT)
|
||||
#define FLAG_TO_PG(f) (((f)&PG_MASK)>>PG_SHIFT)
|
||||
#define ADDR_MASK (((unsigned long) 1 << PG_SHIFT) - 1)
|
||||
#define PG_MASK ((unsigned long) 3 << PG_SHIFT)
|
||||
#define PG_TO_FLAG(p) ((p) << PG_SHIFT)
|
||||
#define FLAG_TO_PG(f) (((f) & PG_MASK) >> PG_SHIFT)
|
||||
|
||||
/*
|
||||
* names of "special" sections
|
||||
|
Loading…
Reference in New Issue
Block a user