aboutsummaryrefslogtreecommitdiff
path: root/bfd/mmo.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-05-03 14:26:41 +0000
committerAlan Modra <amodra@gmail.com>2006-05-03 14:26:41 +0000
commitf592407e4d75fc64e87c25cdd8b21361b3d322d1 (patch)
tree4e8e443fe60738428fab199fed60bec072d4f0e8 /bfd/mmo.c
parent81fc501adbf7c1219caabb3403c4c8950e8209c8 (diff)
downloadgdb-f592407e4d75fc64e87c25cdd8b21361b3d322d1.zip
gdb-f592407e4d75fc64e87c25cdd8b21361b3d322d1.tar.gz
gdb-f592407e4d75fc64e87c25cdd8b21361b3d322d1.tar.bz2
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.
Diffstat (limited to 'bfd/mmo.c')
-rw-r--r--bfd/mmo.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 091b341..20ac406 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -1,5 +1,5 @@
/* BFD back-end for mmo objects (MMIX-specific object-format).
- Copyright 2001, 2002, 2003, 2004, 2005
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com).
Infrastructure and other bits originally copied from srec.c and
@@ -2007,19 +2007,21 @@ mmo_scan (bfd *abfd)
we point out the shape of allocated section contents. */
static bfd_boolean
-mmo_new_section_hook (bfd *abfd ATTRIBUTE_UNUSED, asection *newsect)
+mmo_new_section_hook (bfd *abfd, asection *newsect)
{
- /* We zero-fill all fields and assume NULL is represented by an all
- zero-bit pattern. */
- newsect->used_by_bfd =
- bfd_zalloc (abfd, sizeof (struct mmo_section_data_struct));
-
if (!newsect->used_by_bfd)
- return FALSE;
+ {
+ /* We zero-fill all fields and assume NULL is represented by an all
+ zero-bit pattern. */
+ newsect->used_by_bfd
+ = bfd_zalloc (abfd, sizeof (struct mmo_section_data_struct));
+ if (!newsect->used_by_bfd)
+ return FALSE;
+ }
/* Always align to at least 32-bit words. */
newsect->alignment_power = 2;
- return TRUE;
+ return _bfd_generic_new_section_hook (abfd, newsect);
}
/* We already have section contents loaded for sections that have