From f592407e4d75fc64e87c25cdd8b21361b3d322d1 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 3 May 2006 14:26:41 +0000 Subject: bfd/ * libbfd-in.h (_bfd_generic_new_section_hook): Declare. * section.c (bfd_abs_symbol, bfd_com_symbol): Delete. (bfd_und_symbol, bfd_ind_symbol): Delete. (BFD_FAKE_SECTION): Remove SYM_PTR param, set symbol_ptr_ptr to &SEC.symbol. (STD_SECTION): Adjust. (_bfd_generic_new_section_hook): New function, extracted from.. (bfd_section_init): ..here. (bfd_make_section_old_way): Call new_section_hook for abs, com, und and ind sections. * elf.c (_bfd_elf_large_com_section): Adjust. * aoutx.h (new_section_hook): Call _bfd_generic_new_section_hook. * pdp11.c (new_section_hook): Likewise. * coffcode.h (coff_new_section_hook): Likewise. * ecoff.c (_bfd_ecoff_new_section_hook): Likewise. * elf.c (_bfd_elf_new_section_hook): Likewise. * vms.c (vms_new_section_hook): Likwise. * elf32-arm.c (elf32_arm_new_section_hook): Check used_by_bfd isn't already set. * elf32-sh64.c (sh64_elf_new_section_hook): Likewise. * elf32-xtensa.c (elf_xtensa_new_section_hook): Likewise. * elf64-mmix.c (mmix_elf_new_section_hook): Likewise. * elf64-ppc.c (ppc64_elf_new_section_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_new_section_hook): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_new_section_hook): Likewise. * ieee.c (ieee_new_section_hook): Likewise. Call _bfd_generic_new_section_hook too. * mmo.c (mmo_new_section_hook): Likewise. * oasys.c (oasys_new_section_hook): Likewise. * som.c (som_new_section_hook): Likewise. * coff-w65.c (reloc_processing): Don't use bfd_abs_symbol. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. gas/ * subsegs.c (subseg_get): Don't call obj_sec_set_private_data. * config/obj-elf.h (obj_sec_set_private_data): Delete. * config/tc-hppa.c (tc_gen_reloc): Don't use bfd_abs_symbol. * config/tc-mn10300.c (tc_gen_reloc): Likewise. --- gas/ChangeLog | 7 +++++++ gas/config/obj-elf.h | 7 ------- gas/config/tc-hppa.c | 41 ++++++++++++++++++++++------------------- gas/config/tc-mn10300.c | 3 ++- gas/subsegs.c | 6 +----- 5 files changed, 32 insertions(+), 32 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 016a286..1ed8d70 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2006-05-03 Alan Modra + + * subsegs.c (subseg_get): Don't call obj_sec_set_private_data. + * config/obj-elf.h (obj_sec_set_private_data): Delete. + * config/tc-hppa.c (tc_gen_reloc): Don't use bfd_abs_symbol. + * config/tc-mn10300.c (tc_gen_reloc): Likewise. + 2006-05-02 Joseph Myers * config/tc-arm.c (do_iwmmxt_wldstbh): Don't multiply offset by 4 diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index 7070ac2..7792f79 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -134,13 +134,6 @@ int elf_s_get_other (symbolS *); extern asection *gdb_section; -#ifndef obj_sec_set_private_data -#define obj_sec_set_private_data(B, S) \ - if (! BFD_SEND ((B), _new_section_hook, ((B), (S)))) \ - as_fatal (_("can't allocate ELF private section data: %s"), \ - bfd_errmsg (bfd_get_error ())) -#endif - #ifndef obj_frob_file #define obj_frob_file elf_frob_file #endif diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index 8ae5a57..177e36a 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -1,6 +1,6 @@ /* tc-hppa.c -- Assemble for the PA Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -4196,36 +4196,39 @@ tc_gen_reloc (section, fixp) of two symbols. With that in mind we fill in all four relocs now and break out of the loop. */ assert (i == 1); - relocs[0]->sym_ptr_ptr = (asymbol **) &(bfd_abs_symbol); - relocs[0]->howto = - bfd_reloc_type_lookup (stdoutput, - (bfd_reloc_code_real_type) *codes[0]); + relocs[0]->sym_ptr_ptr + = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr; + relocs[0]->howto + = bfd_reloc_type_lookup (stdoutput, + (bfd_reloc_code_real_type) *codes[0]); relocs[0]->address = fixp->fx_frag->fr_address + fixp->fx_where; relocs[0]->addend = 0; relocs[1]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); *relocs[1]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); - relocs[1]->howto = - bfd_reloc_type_lookup (stdoutput, - (bfd_reloc_code_real_type) *codes[1]); + relocs[1]->howto + = bfd_reloc_type_lookup (stdoutput, + (bfd_reloc_code_real_type) *codes[1]); relocs[1]->address = fixp->fx_frag->fr_address + fixp->fx_where; relocs[1]->addend = 0; relocs[2]->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); *relocs[2]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy); - relocs[2]->howto = - bfd_reloc_type_lookup (stdoutput, - (bfd_reloc_code_real_type) *codes[2]); + relocs[2]->howto + = bfd_reloc_type_lookup (stdoutput, + (bfd_reloc_code_real_type) *codes[2]); relocs[2]->address = fixp->fx_frag->fr_address + fixp->fx_where; relocs[2]->addend = 0; - relocs[3]->sym_ptr_ptr = (asymbol **) &(bfd_abs_symbol); - relocs[3]->howto = - bfd_reloc_type_lookup (stdoutput, - (bfd_reloc_code_real_type) *codes[3]); + relocs[3]->sym_ptr_ptr + = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr; + relocs[3]->howto + = bfd_reloc_type_lookup (stdoutput, + (bfd_reloc_code_real_type) *codes[3]); relocs[3]->address = fixp->fx_frag->fr_address + fixp->fx_where; relocs[3]->addend = 0; - relocs[4]->sym_ptr_ptr = (asymbol **) &(bfd_abs_symbol); - relocs[4]->howto = - bfd_reloc_type_lookup (stdoutput, - (bfd_reloc_code_real_type) *codes[4]); + relocs[4]->sym_ptr_ptr + = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr; + relocs[4]->howto + = bfd_reloc_type_lookup (stdoutput, + (bfd_reloc_code_real_type) *codes[4]); relocs[4]->address = fixp->fx_frag->fr_address + fixp->fx_where; relocs[4]->addend = 0; goto done; diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index 102c2ea..56ee06e 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -2407,7 +2407,8 @@ tc_gen_reloc (seg, fixp) break; default: - reloc->sym_ptr_ptr = (asymbol **) &bfd_abs_symbol; + reloc->sym_ptr_ptr + = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr; return reloc; } } diff --git a/gas/subsegs.c b/gas/subsegs.c index 9401d61..c81c09a 100644 --- a/gas/subsegs.c +++ b/gas/subsegs.c @@ -1,6 +1,6 @@ /* subsegs.c - subsegments - Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -244,10 +244,6 @@ subseg_get (const char *segname, int force_new) else secptr = bfd_make_section_anyway (stdoutput, segname); -#ifdef obj_sec_set_private_data - obj_sec_set_private_data (stdoutput, secptr); -#endif - seginfo = seg_info (secptr); if (! seginfo) { -- cgit v1.1