From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25442 invoked by alias); 2 Mar 2009 20:46:15 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 25362 invoked by uid 9674); 2 Mar 2009 20:46:13 -0000 Date: Mon, 02 Mar 2009 20:46:00 -0000 Message-ID: <20090302204613.25347.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer: Merge commit 'origin/archer-jankratochvil-misc' into archer X-Git-Refname: refs/heads/archer X-Git-Reftype: branch X-Git-Oldrev: 9a550f784d43869ae4ae92f3e2ba92e3dffdcfce X-Git-Newrev: cec79ce49870fcc1a6ff3307a398c57629def724 X-SW-Source: 2009-q1/txt/msg00232.txt.bz2 List-Id: The branch, archer has been updated via cec79ce49870fcc1a6ff3307a398c57629def724 (commit) via 2f4534f00e90e15f04716bc977ba81a99f6ae942 (commit) via 2fac9534dc2dc85f7c999b94574cf0acf1767dd6 (commit) via 22d08140a880ab777cbc9090d87dd9b3b6c1631b (commit) via dbdbd032f965ce2d447859f2ea15dfd8d488f268 (commit) via b83458acdef987da786ffd02a312cb8b8ca2a6ea (commit) via 5f2b2a8cca73a90618b488f66866fdff75892d4b (commit) via c7c96c12054b0089c813555d72c60e8cdaa56946 (commit) via 89308881045da59ed60edaa07f891df15db630c6 (commit) via d1078c2fa27154160e390b04f9c89a41103d80ed (commit) via 1453f41cc1b2703b905f769de4b48a4db44a21d2 (commit) via 67ce5c51fad3b8bdc866d181e58293e87dc265a3 (commit) via 9c0fd74003677eef751f51629c403a03f2241c06 (commit) via 348985d7c203ef469d9ffdb1d921475f48a7e823 (commit) via 632bf4271d3217495085f83b1de7845ac2da0032 (commit) via eec15c138feaba1072ea64acfb27eef7357dc3a7 (commit) via db8f8a559425859ed43df0ea70b4f6b2a4dcd506 (commit) via 5f25e94a1252325146a1fc7d3b2449450292d38d (commit) via f3859ae1c33373a36e211e7c1500054908f6a189 (commit) via 70baabfbb4e13618de72299df79682022cdf9bd8 (commit) via 22e9b41768f640a6dece93c706e0bf6f43779cc7 (commit) via 3db9d948d9ea2a69608f2cb5260364979c4c326b (commit) via b0f394cdd4280b1f8ad7dd4a034318badf3cb04c (commit) via de8053313621eb1ba7db9f44d691b366d50143f9 (commit) from 9a550f784d43869ae4ae92f3e2ba92e3dffdcfce (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit cec79ce49870fcc1a6ff3307a398c57629def724 Merge: 2f4534f00e90e15f04716bc977ba81a99f6ae942 dbdbd032f965ce2d447859f2ea15dfd8d488f268 Author: Jan Kratochvil Date: Mon Mar 2 21:45:49 2009 +0100 Merge commit 'origin/archer-jankratochvil-misc' into archer commit 2f4534f00e90e15f04716bc977ba81a99f6ae942 Merge: 22d08140a880ab777cbc9090d87dd9b3b6c1631b 2fac9534dc2dc85f7c999b94574cf0acf1767dd6 Author: Jan Kratochvil Date: Mon Mar 2 21:45:43 2009 +0100 Merge commit 'origin/archer-jankratochvil-python' into archer commit 22d08140a880ab777cbc9090d87dd9b3b6c1631b Merge: 9a550f784d43869ae4ae92f3e2ba92e3dffdcfce c7c96c12054b0089c813555d72c60e8cdaa56946 Author: Jan Kratochvil Date: Mon Mar 2 21:44:22 2009 +0100 Merge commit 'origin/archer-keiths-expr-cumulative' into archer Conflicts: gdb/dwarf2read.c ----------------------------------------------------------------------- Summary of changes: ChangeLog | 11 + bfd/ChangeLog | 79 + bfd/Makefile.am | 9 +- bfd/Makefile.in | 8 + bfd/archures.c | 4 +- bfd/bfd-in2.h | 17 +- bfd/configure | 12 +- bfd/configure.in | 4 +- bfd/cpu-score.c | 68 +- bfd/elf-hppa.h | 1160 +--------------- bfd/elf32-hppa.c | 70 +- bfd/elf32-score.c | 2250 +++++++++++++++++++---------- bfd/elf32-score.h | 152 ++ bfd/{elf32-score.c => elf32-score7.c} | 1842 ++++++++++++------------ bfd/elf64-hppa.c | 2206 ++++++++++++++++++++++------ bfd/libbfd.h | 4 +- bfd/reloc.c | 17 +- bfd/version.h | 2 +- gdb/ChangeLog | 23 + gdb/Makefile.in | 12 +- gdb/common/gdb_signals.h | 56 + gdb/{signals => common}/signals.c | 9 +- gdb/doc/gdb.texinfo | 20 +- gdb/dwarf2read.c | 10 +- gdb/gdbserver/ChangeLog | 8 + gdb/gdbserver/Makefile.in | 7 +- gdb/gdbserver/server.h | 8 +- gdb/infrun.c | 58 +- gdb/python/python-frame.c | 24 +- gdb/rs6000-tdep.c | 52 +- gdb/symtab.c | 145 +- gdb/target.h | 34 +- gdb/testsuite/gdb.arch/powerpc-power7.exp | 176 +++ gdb/testsuite/gdb.arch/powerpc-power7.s | 107 ++ gdb/testsuite/gdb.cp/namespace-using.exp | 35 +- gdb/testsuite/gdb.python/python-frame.exp | 9 + gdb/version.in | 2 +- include/elf/ChangeLog | 5 + include/elf/common.h | 3 + include/elf/score.h | 13 +- include/opcode/ChangeLog | 6 + include/opcode/score-datadep.h | 227 +--- include/opcode/score-inst.h | 313 +---- libtool.m4 | 12 +- opcodes/ChangeLog | 14 + opcodes/Makefile.am | 7 + opcodes/Makefile.in | 7 + opcodes/configure | 10 +- opcodes/configure.in | 2 +- opcodes/score-dis.c | 880 ++++++++++-- opcodes/score-opc.h | 460 +++---- opcodes/score7-dis.c | 972 +++++++++++++ 52 files changed, 7173 insertions(+), 4468 deletions(-) create mode 100644 bfd/elf32-score.h copy bfd/{elf32-score.c => elf32-score7.c} (69%) create mode 100644 gdb/common/gdb_signals.h rename gdb/{signals => common}/signals.c (99%) create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7.s create mode 100644 opcodes/score7-dis.c First 500 lines of diff: diff --git a/ChangeLog b/ChangeLog index 474f3d4..5ee9384 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-03-01 Ralf Wildenhues + + Backport from git Libtool: + + 2009-01-19 Robert Millan + Support GNU/kOpenSolaris. + * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) + (_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS) + (_LT_LANG_CXX_CONFIG) [kopensolaris*-gnu]: Recognize + GNU/kOpenSolaris. + 2009-02-05 Andreas Schwab * Makefile.tpl (stage_last): Define $r and $s before using diff --git a/bfd/ChangeLog b/bfd/ChangeLog index bdd2f80..d431c0d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,82 @@ +2009-03-02 Qinwei + + * elf32-score7.c: New file. + * elf32-score.h: New file. + * elf32-score.c: Add code to support score 7. Set score7 as the + default. + * cpu-score.c: Add score7 architecure. + (compatibile): New function. + * Makefile.am: Add rules for building elf32-score7 object. + * Makefile.in: Regenerate. + * configure.in: Add elf32-score7 object to score vectors. + * configure: Regenerate. + * reloc.c: Add score7 relocs. + * archures.c: Add score3 and score7 machine numbers. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + +2009-03-01 Ralf Wildenhues + + * configure: Regenerate. + +2009-03-01 John David Anglin + + * elf32-hppa.c (hppa32_elf_local_refcounts): New function. + (elf32_hppa_check_relocs): Use it. + + * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to + elf64-hppa.c. + (elf_hppa_unmark_useless_dynamic_symbols): Likewise. + (elf_hppa_remark_useless_dynamic_symbols): Likewise. + (elf_hppa_is_dynamic_loader_symbol): Likewise. + (elf_hppa_record_segment_addrs): Likewise. + (elf_hppa_final_link): Likewise. + (elf_hppa_relocate_insn): Likewise. + (elf_hppa_final_link_relocate): Likewise. + (elf64_hppa_relocate_section): Likewise. + * elf64-hppa.c: Insert above. + +2009-02-28 John David Anglin + + * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link. + (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table. + (elf_hppa_relocate_section): Likewise. + * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive + from struct elf_link_hash_entry. Add count field. + (struct elf64_hppa_dyn_hash_table): Delete. + (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field. + (elf64_hppa_hash_table): Rename to hppa_link_hash_table. + (hppa_elf_hash_entry, eh_name): Define. + (elf64_hppa_new_dyn_hash_entry): Delete. + (elf64_hppa_dyn_hash_lookup): Delete. + (elf64_hppa_dyn_hash_traverse): Delete. + (get_dyn_name): Delete. + (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead + of struct elf64_hppa_dyn_hash_entry *. + (elf64_hppa_finalize_dlt, llocate_global_data_dlt, + allocate_global_data_plt, allocate_global_data_stub, + allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries): + Likewise. + (hppa64_link_hash_newfunc): New. + (elf64_hppa_hash_table_create): Rework. + (count_dyn_reloc): Likewise. + (hppa64_elf_local_refcounts): New. + (elf64_hppa_check_relocs): Rework using standard technique for recording + local DLT, PLT and OPD reference counts. + (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct + elf_link_hash_entry *. + (elf64_hppa_mark_exported_functions, allocate_global_data_dlt, + allocate_global_data_plt, allocate_global_data_stub, + allocate_global_data_opd, allocate_dynrel_entries, + elf64_hppa_adjust_dynamic_symbol, + elf64_hppa_mark_milli_and_exported_functions): Likewise. + (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections): + Use hppa_link_hash_table. Rework. + (elf64_hppa_link_output_symbol_hook): Rework. + (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd, + elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc, + elf64_hppa_finish_dynamic_sections): Likewise. + 2009-02-26 Christophe Lyon * elf32-arm.c (stub_reloc_type): Removed. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 8d67cb8..08f0c2a 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -289,6 +289,7 @@ BFD32_BACKENDS = \ elf32-ppc.lo \ elf32-s390.lo \ elf32-score.lo \ + elf32-score7.lo \ elf32-sh.lo \ elf32-sh-symbian.lo \ elf32-sh64.lo \ @@ -474,6 +475,7 @@ BFD32_BACKENDS_CFILES = \ elf32-sh64-com.c \ elf32-s390.c \ elf32-score.c \ + elf32-score7.c \ elf32-sh.c \ elf32-sh-symbian.c \ elfxx-sparc.c \ @@ -1570,7 +1572,12 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-score7.lo: elf32-score7.c $(INCDIR)/filenames.h \ + $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 9932dea..1eb5887 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -555,6 +555,7 @@ BFD32_BACKENDS = \ elf32-ppc.lo \ elf32-s390.lo \ elf32-score.lo \ + elf32-score7.lo \ elf32-sh.lo \ elf32-sh-symbian.lo \ elf32-sh64.lo \ @@ -739,6 +740,7 @@ BFD32_BACKENDS_CFILES = \ elf32-sh64.c \ elf32-sh64-com.c \ elf32-s390.c \ + elf32-score7.c \ elf32-score.c \ elf32-sh.c \ elf32-sh-symbian.c \ @@ -2167,6 +2169,12 @@ elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-score7.lo: elf32-score7.c $(INCDIR)/filenames.h \ + $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/bfdlink.h elf32-score.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ diff --git a/bfd/archures.c b/bfd/archures.c index f548ea2..fa03d81 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -1,6 +1,6 @@ /* BFD library support routines for architectures. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. @@ -376,6 +376,8 @@ DESCRIPTION .#define bfd_mach_s390_31 31 .#define bfd_mach_s390_64 64 . bfd_arch_score, {* Sunplus score *} +.#define bfd_mach_score3 3 +.#define bfd_mach_score7 7 . bfd_arch_openrisc, {* OpenRISC *} . bfd_arch_mmix, {* Donald Knuth's educational processor. *} . bfd_arch_xstormy16, diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 7870962..be35ac4 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -2002,6 +2002,8 @@ enum bfd_architecture #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 bfd_arch_score, /* Sunplus score */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, @@ -3889,10 +3891,8 @@ instructions */ BFD_RELOC_390_GOTPLT20, BFD_RELOC_390_TLS_GOTIE20, -/* Score relocations */ - BFD_RELOC_SCORE_DUMMY1, - -/* Low 16 bit for load/store */ +/* Score relocations +Low 16 bit for load/store */ BFD_RELOC_SCORE_GPREL15, /* This is a 24-bit reloc with the right 1 bit assumed to be 0 */ @@ -3902,12 +3902,21 @@ instructions */ /* This is a 19-bit reloc with the right 1 bit assumed to be 0 */ BFD_RELOC_SCORE_BRANCH, +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM30, + +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM32, + /* This is a 11-bit reloc with the right 1 bit assumed to be 0 */ BFD_RELOC_SCORE16_JMP, /* This is a 8-bit reloc with the right 1 bit assumed to be 0 */ BFD_RELOC_SCORE16_BRANCH, +/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BCMP, + /* Undocumented Score relocs */ BFD_RELOC_SCORE_GOT15, BFD_RELOC_SCORE_GOT_LO16, diff --git a/bfd/configure b/bfd/configure index 80e5eaf..6c21291 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6179,7 +6179,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -8327,7 +8327,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8888,7 +8888,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -10437,7 +10437,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -20783,8 +20783,8 @@ do bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; - bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; - bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; + bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;; + bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;; # FIXME: We include cofflink.lo not because it's needed for # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec # which needs it but does not list it. Should be fixed in right place. diff --git a/bfd/configure.in b/bfd/configure.in index a444418..a56004d 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -724,8 +724,8 @@ do bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; - bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; - bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; + bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;; + bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true;; # FIXME: We include cofflink.lo not because it's needed for # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec # which needs it but does not list it. Should be fixed in right place. diff --git a/bfd/cpu-score.c b/bfd/cpu-score.c index 0ccc371..0ed4095 100644 --- a/bfd/cpu-score.c +++ b/bfd/cpu-score.c @@ -1,8 +1,9 @@ /* BFD support for the score processor - Copyright 2006, 2007 Free Software Foundation, Inc. + Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by + Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) - Pei-Lin Tsai (pltsai@sunplus.com) + Pei-Lin Tsai (pltsai@sunplus.com) This file is part of BFD, the Binary File Descriptor library. @@ -21,32 +22,47 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "sysdep.h" #include "bfd.h" +#include "sysdep.h" #include "libbfd.h" -const bfd_arch_info_type -bfd_score_arch = +/* This routine is provided two arch_infos and works out which Score + machine which would be compatible with both and returns a pointer + to its info structure. */ + +static const bfd_arch_info_type * +compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b) { - 32, /* There's 32 bits_per_word. */ - 32, /* There's 32 bits_per_address. */ - 8, /* There's 8 bits_per_byte. */ - bfd_arch_score, /* One of enum bfd_architecture, defined - in archures.c and provided in - generated header files. */ - 0, /* Only 1 machine, but #255 for - historical reasons. */ - "score", /* The arch_name. */ - "score", /* The printable name is the same. */ - 4, /* Section alignment power; each section - is aligned to (only) 2^4 bytes. */ - TRUE, /* This is the default "machine", since - there's only one. */ - bfd_default_compatible, /* A default function for testing - "machine" compatibility of two - bfd_arch_info_type. */ - bfd_default_scan, /* Check if an bfd_arch_info_type is a - match. */ - NULL /* Pointer to next bfd_arch_info_type in - the same family. */ + /* If a & b are for different architectures we can do nothing. */ + if (a->arch != b->arch) + return NULL; + + if (a->mach != b->mach) + return NULL; + + return a; +} + +#define N(addr_bits, machine, print, default, next) \ +{ \ + 32, /* 16 bits in a word. */ \ + 32, /* Bits in an address. */ \ + 8, /* 8 bits in a byte. */ \ + bfd_arch_score, \ + machine, /* Machine number. */ \ + "score", /* Architecture name. */ \ + print, /* Printable name. */ \ + 4, /* Section align power. */ \ + default, /* The default machine. */ \ + compatible, \ + bfd_default_scan, \ + next \ +} + +static const bfd_arch_info_type arch_info_struct[] = +{ + N (16, bfd_mach_score3, "score3", FALSE, NULL), }; + +const bfd_arch_info_type bfd_score_arch = + N (16, bfd_mach_score7, "score7", TRUE, & arch_info_struct[0]); diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index 0edf989..51a9484 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -1,5 +1,5 @@ /* Common code for PA ELF implementations. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1218,1161 +1218,3 @@ elf_hppa_action_discarded (asection *sec) return _bfd_elf_default_action_discarded (sec); } - -#if ARCH_SIZE == 64 -/* Hook called by the linker routine which adds symbols from an object - file. HP's libraries define symbols with HP specific section - indices, which we have to handle. */ - -static bfd_boolean -elf_hppa_add_symbol_hook (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED, - Elf_Internal_Sym *sym, - const char **namep ATTRIBUTE_UNUSED, - flagword *flagsp ATTRIBUTE_UNUSED, - asection **secp, - bfd_vma *valp) -{ - unsigned int index = sym->st_shndx; - - switch (index) - { - case SHN_PARISC_ANSI_COMMON: - *secp = bfd_make_section_old_way (abfd, ".PARISC.ansi.common"); - (*secp)->flags |= SEC_IS_COMMON; - *valp = sym->st_size; - break; - - case SHN_PARISC_HUGE_COMMON: - *secp = bfd_make_section_old_way (abfd, ".PARISC.huge.common"); - (*secp)->flags |= SEC_IS_COMMON; - *valp = sym->st_size; - break; - } - - return TRUE; -} - -static bfd_boolean -elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, - void *data) -{ - struct bfd_link_info *info = data; - - if (h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - /* If we are not creating a shared library, and this symbol is - referenced by a shared library but is not defined anywhere, then - the generic code will warn that it is undefined. - - This behavior is undesirable on HPs since the standard shared - libraries contain references to undefined symbols. - - So we twiddle the flags associated with such symbols so that they - will not trigger the warning. ?!? FIXME. This is horribly fragile. - - Ultimately we should have better controls over the generic ELF BFD - linker code. */ - if (! info->relocatable - && info->unresolved_syms_in_shared_libs != RM_IGNORE - && h->root.type == bfd_link_hash_undefined - && h->ref_dynamic - && !h->ref_regular) - { - h->ref_dynamic = 0; - h->pointer_equality_needed = 1; - } - - return TRUE; -} - -static bfd_boolean -elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, - void *data) -{ - struct bfd_link_info *info = data; - - if (h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - /* If we are not creating a shared library, and this symbol is - referenced by a shared library but is not defined anywhere, then - the generic code will warn that it is undefined. - - This behavior is undesirable on HPs since the standard shared - libraries contain references to undefined symbols. - - So we twiddle the flags associated with such symbols so that they - will not trigger the warning. ?!? FIXME. This is horribly fragile. - - Ultimately we should have better controls over the generic ELF BFD hooks/post-receive -- Repository for Project Archer.