Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3-0]: src Apply patch (requested by skrll in ticket #1529):
details: https://anonhg.NetBSD.org/src/rev/03478abf8de3
branches: netbsd-3-0
changeset: 579303:03478abf8de3
user: ghen <ghen%NetBSD.org@localhost>
date: Thu Oct 12 09:49:55 2006 +0000
description:
Apply patch (requested by skrll in ticket #1529):
PR toolchain/34258: Fix cross-building NetBSD 3.x binutils with GCC 4.x.
diffstat:
gnu/dist/binutils/ChangeLog | 41 +++++++++++++
gnu/dist/binutils/bfd/coff-alpha.c | 2 +-
gnu/dist/binutils/bfd/elf32-iq2000.c | 2 +-
gnu/dist/binutils/bfd/pdp11.c | 50 ++++++---------
gnu/dist/binutils/gas/as.h | 18 +++++-
gnu/dist/binutils/gas/config/obj-coff.c | 4 +-
gnu/dist/binutils/gas/config/obj-ecoff.h | 2 +-
gnu/dist/binutils/gas/config/tc-arc.c | 88 ++++++++++++++--------------
gnu/dist/binutils/gas/config/tc-arm.c | 2 +
gnu/dist/binutils/gas/config/tc-cris.h | 5 +-
gnu/dist/binutils/gas/config/tc-frv.c | 2 +-
gnu/dist/binutils/gas/config/tc-mcore.c | 11 +-
gnu/dist/binutils/gas/config/tc-mips.c | 18 ++---
gnu/dist/binutils/gas/config/tc-mmix.c | 19 +-----
gnu/dist/binutils/gas/config/tc-s390.c | 6 +-
gnu/dist/binutils/gas/config/tc-sh.c | 2 +-
gnu/dist/binutils/gas/config/tc-sparc.c | 14 ++--
gnu/dist/binutils/gas/config/tc-tic4x.c | 6 +-
gnu/dist/binutils/gas/config/tc-tic4x.h | 4 +-
gnu/dist/binutils/gas/config/tc-vax.c | 9 ++-
gnu/dist/binutils/gas/config/tc-xstormy16.c | 10 +-
gnu/dist/binutils/gas/itbl-lex.h | 23 +++++++
gnu/dist/binutils/gas/itbl-lex.l | 3 +-
gnu/dist/binutils/gas/itbl-parse.y | 6 +-
gnu/dist/binutils/gas/subsegs.h | 11 +--
gnu/dist/binutils/gas/tc.h | 19 ------
gnu/dist/binutils/opcodes/fr30-desc.h | 4 +-
gnu/dist/binutils/opcodes/frv-desc.h | 4 +-
gnu/dist/binutils/opcodes/ip2k-desc.h | 4 +-
gnu/dist/binutils/opcodes/iq2000-asm.c | 2 +
gnu/dist/gcc/gcc/cp/decl.c | 6 +-
gnu/dist/gcc/include/obstack.h | 40 ++++++++----
gnu/dist/gdb/include/obstack.h | 40 ++++++++----
gnu/dist/groff/src/preproc/eqn/box.h | 7 +-
gnu/dist/groff/src/roff/troff/div.h | 4 +-
gnu/dist/groff/src/roff/troff/env.h | 4 +-
gnu/dist/groff/src/roff/troff/input.cpp | 5 +-
usr.bin/mkesdb/ldef.h | 3 +-
usr.sbin/makefs/ffs/ffs_alloc.c | 6 +-
usr.sbin/makefs/ffs/ufs_inode.h | 18 +++++-
40 files changed, 308 insertions(+), 216 deletions(-)
diffs (truncated from 1344 to 300 lines):
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/ChangeLog
--- a/gnu/dist/binutils/ChangeLog Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/ChangeLog Thu Oct 12 09:49:55 2006 +0000
@@ -1,3 +1,44 @@
+2005-02-17 Alan Modra <amodra%bigpond.net.au@localhost>
+
+ * tc.h (struct relax_type, relax_typeS): Move from here..
+ * as.h: ..to here. Make rlx_forward and rlx_backward an offsetT.
+ * ecoff.c (ecoff_new_file): Add appfile param.
+ * ecoff.h (ecoff_new_file): Likewise.
+ * itbl-lex.h: New file.
+ * itbl-lex.l: Include itbl-lex.h.
+ * itbl-parse.y: Likewise.
+ (insntbl_line, yyparse, yylex): Move to itbl-lex.h.
+ * read.c (s_app_file_string): Mark appfile possibly unused.
+ * subsegs.c (seg_not_empty_p): Make sec possibly unused.
+ * subsegs.h (struct seg_info_trash): Delete.
+ (seg_info): Use segment_info_type instead.
+ * config/obj-coff.c (struct filename_list): Make filename const char *.
+ * config/obj-ecoff.h (obj_app_file): Pass app to ecoff_new_file.
+ * config/obj-elf.c (elf_file_symbol): Similarly.
+ * config/tc-a29k.c (md_apply_fix3): Make val a valueT. Don't use
+ signed right shift.
+ * config/tc-arc.c (md_operand): Warning fix.
+ * config/tc-arm.c (arm_parse_reloc): Only define when OBJ_ELF.
+ (md_begin): Rearrange #if defined OBJ_COFF || defined OBJ_ELF.
+ * config/tc-cris.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Use do while.
+ * config/tc-frv.c (frv_force_relocation): Warning fix.
+ * config/tc-m68k.c (md_parse_option): Delete unused var.
+ * config/tc-mcore.c (mylog2): Rename from log2 throughout.
+ * config/tc-sparc.c: Likewise.
+ (s_common): Warning fix.
+ * config/tc-mips.c (append_insn): Use unsigned long long expressions.
+ * config/tc-mmix.c (PUSHJSTUB_MAX, PUSHJSTUB_MIN): Define from
+ addressT.
+ * config/tc-s390.c (s390_insn): Delete test of unsigned >= 0.
+ * config/tc-sh.c (sh_cfi_frame_initial_instructions,
+ sh_regname_to_dw2regnum): Only define for OBJ_ELF.
+ * config/tc-tic4x.c (tic4x_insert_reg): Use ISLOWER.
+ (tic4x_do_align): Use TIC_NOP_OPCODE.
+ * config/tc-tic4x.h (TIC_NOP_OPCODE): Rename from NOP_OPCODE.
+ * config/tc-vax.c: Include netinet/in.h.
+ (tc_headers_hook): Formatting.
+ * config/tc-xstormy16.c (md_pcrel_from_section): Correct parens.
+
2004-05-06 Daniel Jacobowitz <dan%debian.org@localhost>
* src-release (do-tar): Add directories to the tar file.
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/bfd/coff-alpha.c
--- a/gnu/dist/binutils/bfd/coff-alpha.c Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/bfd/coff-alpha.c Thu Oct 12 09:49:55 2006 +0000
@@ -1457,7 +1457,7 @@
amt = sizeof (struct ecoff_section_tdata);
lita_sec_data = ((struct ecoff_section_tdata *)
bfd_zalloc (input_bfd, amt));
- ecoff_section_data (input_bfd, lita_sec) = lita_sec_data;
+ lita_sec->used_by_bfd = lita_sec_data;
}
if (lita_sec_data->gp != 0)
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/bfd/elf32-iq2000.c
--- a/gnu/dist/binutils/bfd/elf32-iq2000.c Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/bfd/elf32-iq2000.c Thu Oct 12 09:49:55 2006 +0000
@@ -512,7 +512,7 @@
if (changed)
/* Note that we've changed relocs, otherwise if !info->keep_memory
we'll free the relocs and lose our changes. */
- (const Elf_Internal_Rela *) (elf_section_data (sec)->relocs) = relocs;
+ elf_section_data (sec)->relocs = (Elf_Internal_Rela *) relocs;
return TRUE;
}
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/bfd/pdp11.c
--- a/gnu/dist/binutils/bfd/pdp11.c Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/bfd/pdp11.c Thu Oct 12 09:49:55 2006 +0000
@@ -341,11 +341,6 @@
#define RELOC_SIZE 2
-struct pdp11_aout_reloc_external
-{
- bfd_byte e_reloc_entry[2];
-};
-
#define RELFLG 0x0001 /* pc-relative flag */
#define RTYPE 0x000e /* type mask */
#define RIDXMASK 0xfff0 /* index mask */
@@ -368,9 +363,9 @@
static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *));
static int pdp11_aout_write_headers PARAMS ((bfd *, struct internal_exec *));
-void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, struct pdp11_aout_reloc_external *));
+void pdp11_aout_swap_reloc_out PARAMS ((bfd *, arelent *, bfd_byte *));
void pdp11_aout_swap_reloc_in
-PARAMS ((bfd *, struct pdp11_aout_reloc_external *, arelent *,
+PARAMS ((bfd *, bfd_byte *, arelent *,
bfd_size_type, asymbol **, bfd_size_type));
/*
@@ -2034,7 +2029,7 @@
pdp11_aout_swap_reloc_out (abfd, g, natptr)
bfd *abfd;
arelent *g;
- register struct pdp11_aout_reloc_external *natptr;
+ bfd_byte *natptr;
{
int r_index;
int r_pcrel;
@@ -2096,7 +2091,7 @@
reloc_entry = r_index << 4 | r_type | r_pcrel;
- PUT_WORD (abfd, reloc_entry, natptr->e_reloc_entry);
+ PUT_WORD (abfd, reloc_entry, natptr);
}
/* BFD deals internally with all things based from the section they're
@@ -2149,7 +2144,7 @@
pdp11_aout_swap_reloc_in (abfd, bytes, cache_ptr, offset,
symbols, symcount)
bfd *abfd;
- struct pdp11_aout_reloc_external *bytes;
+ bfd_byte *bytes;
arelent *cache_ptr;
bfd_size_type offset;
asymbol **symbols;
@@ -2196,7 +2191,7 @@
sec_ptr asect;
asymbol **symbols;
{
- struct pdp11_aout_reloc_external *rptr;
+ bfd_byte *rptr;
bfd_size_type count;
bfd_size_type reloc_size;
PTR relocs;
@@ -2262,16 +2257,14 @@
cache_ptr = reloc_cache;
- rptr = (struct pdp11_aout_reloc_external *) relocs;
+ rptr = relocs;
for (counter = 0;
counter < count;
- counter++, ((char *)rptr) += RELOC_SIZE, cache_ptr++)
+ counter++, rptr += RELOC_SIZE, cache_ptr++)
{
while (GET_WORD (abfd, (PTR)rptr) == 0)
{
- rptr =
- (struct pdp11_aout_reloc_external *)
- ((char *) rptr + RELOC_SIZE);
+ rptr += RELOC_SIZE;
if ((char *) rptr >= (char *) relocs + reloc_size)
goto done;
}
@@ -2324,10 +2317,9 @@
{
while (count > 0)
{
- struct pdp11_aout_reloc_external *r;
-
- r = (struct pdp11_aout_reloc_external *)
- (native + (*generic)->address);
+ bfd_byte *r;
+
+ r = native + (*generic)->address;
pdp11_aout_swap_reloc_out (abfd, *generic, r);
count--;
generic++;
@@ -3356,7 +3348,7 @@
PARAMS ((struct aout_final_link_info *finfo,
bfd *input_bfd,
asection *input_section,
- struct pdp11_aout_reloc_external *relocs,
+ bfd_byte *relocs,
bfd_size_type rel_size,
bfd_byte *contents));
@@ -4447,7 +4439,7 @@
/* Relocate the section contents. */
if (! pdp11_aout_link_input_section (finfo, input_bfd, input_section,
- (struct pdp11_aout_reloc_external *) relocs,
+ (bfd_byte *) relocs,
rel_size, finfo->contents))
return FALSE;
@@ -4511,7 +4503,7 @@
struct aout_final_link_info *finfo;
bfd *input_bfd;
asection *input_section;
- struct pdp11_aout_reloc_external *relocs;
+ bfd_byte *relocs;
bfd_size_type rel_size;
bfd_byte *contents;
{
@@ -4526,8 +4518,8 @@
struct aout_link_hash_entry **sym_hashes;
int *symbol_map;
bfd_size_type reloc_count;
- register struct pdp11_aout_reloc_external *rel;
- struct pdp11_aout_reloc_external *rel_end;
+ bfd_byte *rel;
+ bfd_byte *rel_end;
output_bfd = finfo->output_bfd;
check_dynamic_reloc = aout_backend_info (output_bfd)->check_dynamic_reloc;
@@ -4544,8 +4536,8 @@
reloc_count = rel_size / RELOC_SIZE;
rel = relocs;
- rel_end = (struct pdp11_aout_reloc_external *)(((char *)rel) + rel_size);
- for (; rel < rel_end; ((char *)rel) += RELOC_SIZE)
+ rel_end = rel + rel_size;
+ for (; rel < rel_end; rel += RELOC_SIZE)
{
bfd_vma r_addr;
int r_index;
@@ -4653,10 +4645,10 @@
}
/* Write out the new r_index value. */
- reloc_entry = GET_WORD (input_bfd, rel->e_reloc_entry);
+ reloc_entry = GET_WORD (input_bfd, rel);
reloc_entry &= RIDXMASK;
reloc_entry |= r_index << 4;
- PUT_WORD (input_bfd, reloc_entry, rel->e_reloc_entry);
+ PUT_WORD (input_bfd, reloc_entry, rel);
}
else
{
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/gas/as.h
--- a/gnu/dist/binutils/gas/as.h Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/gas/as.h Thu Oct 12 09:49:55 2006 +0000
@@ -1,6 +1,6 @@
/* as.h - global header file
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -397,6 +397,22 @@
/* Enough bits for address, but still an integer type.
Could be a problem, cross-assembling for 64-bit machines. */
typedef addressT relax_addressT;
+
+struct relax_type
+{
+ /* Forward reach. Signed number. > 0. */
+ offsetT rlx_forward;
+ /* Backward reach. Signed number. < 0. */
+ offsetT rlx_backward;
+
+ /* Bytes length of this address. */
+ unsigned char rlx_length;
+
+ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
+ relax_substateT rlx_more;
+};
+
+typedef struct relax_type relax_typeS;
/* main program "as.c" (command arguments etc) */
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/gas/config/obj-coff.c
--- a/gnu/dist/binutils/gas/config/obj-coff.c Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/gas/config/obj-coff.c Thu Oct 12 09:49:55 2006 +0000
@@ -1,6 +1,6 @@
/* coff object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002
+ 1999, 2000, 2001, 2002, 2005
Free Software Foundation, Inc.
This file is part of GAS.
@@ -1724,7 +1724,7 @@
into the string table. */
struct filename_list
{
- char *filename;
+ const char *filename;
struct filename_list *next;
};
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/gas/config/obj-ecoff.h
--- a/gnu/dist/binutils/gas/config/obj-ecoff.h Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/gas/config/obj-ecoff.h Thu Oct 12 09:49:55 2006 +0000
@@ -1,5 +1,5 @@
/* ECOFF object file format header file.
- Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002
+ Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian%cygnus.com@localhost>.
diff -r fa5bab7f1943 -r 03478abf8de3 gnu/dist/binutils/gas/config/tc-arc.c
--- a/gnu/dist/binutils/gas/config/tc-arc.c Fri Oct 06 11:18:04 2006 +0000
+++ b/gnu/dist/binutils/gas/config/tc-arc.c Thu Oct 12 09:49:55 2006 +0000
@@ -1655,50 +1655,52 @@
{
Home |
Main Index |
Thread Index |
Old Index