From 2ce9802e144617cb2858cd03d553936eca5cbb3b Mon Sep 17 00:00:00 2001 From: Kim Knuttila Date: Wed, 17 Jul 1996 18:10:20 +0000 Subject: [PATCH] Removed bogus printf --- bfd/ChangeLog | 4 ++++ bfd/coff-ppc.c | 38 +++++++++++++++++++++++++------------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 72fe7ea5f8..e6ca8faae6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +Wed Jul 17 10:58:55 1996 Kim Knuttila + + * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf + Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com) * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c index 02908ce4d9..b6a23c7f72 100644 --- a/bfd/coff-ppc.c +++ b/bfd/coff-ppc.c @@ -1091,7 +1091,10 @@ ppc_mark_symbol_as_glue(abfd, sym, rel) struct ppc_coff_link_hash_entry *h; h = (struct ppc_coff_link_hash_entry *) (obj_coff_sym_hashes (abfd)[sym]); - +#ifdef DEBUG_RELOC + fprintf(stderr, + "ppc_mark_symbol_as_glue:\n"); +#endif CHECK_EYE(h->eye_catcher); h->symbol_is_glue = 1; @@ -1311,6 +1314,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, sym = syms + symndx; } + if (r_type == IMAGE_REL_PPC_IMGLUE && h == 0) + { + fprintf(stderr, + "relocate_section: IMGLUE reloc has no name!\n"); + abort(); + } + sec = NULL; val = 0; @@ -1342,8 +1352,6 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } else { -fprintf(stderr, - "missing %s\n",h->root.root.root.string); if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.root.string, input_bfd, input_section, rel->r_vaddr - input_section->vma))) @@ -1452,11 +1460,6 @@ fprintf(stderr, if ((r_flags & IMAGE_REL_PPC_TOCDEFN) == IMAGE_REL_PPC_TOCDEFN ) -#if 0 - /* This is wrong. If tocdefn is on, we must unconditionally - assume the following path */ - && IS_UNALLOCATED(our_toc_offset)) -#endif { /* This is unbelievable cheese. Some knowledgable asm hacker has decided to use r2 as a base for loading @@ -1474,8 +1477,10 @@ fprintf(stderr, */ #ifdef DEBUG_RELOC fprintf(stderr, - "TOCDEFN is on, (%s) (%p) our_toc_offset = %x\n", - name, h, our_toc_offset); + "TOCDEFN is on, (%s) (%p) our_toc_offset = %x, val (%x) vma (%x) off (%x)\n", + name, h, our_toc_offset, + val, toc_section->output_section->vma, + toc_section->output_offset); #endif our_toc_offset = val - @@ -1491,7 +1496,7 @@ fprintf(stderr, if (our_toc_offset >= 65535) { fprintf(stderr, - "TOCDEFN Relocation exceeded displacement of 65535\n"); + "Error: TOCDEFN Relocation of %d for %s exceeded displacement of 65535\n", our_toc_offset, name); abort(); } @@ -3101,6 +3106,13 @@ ppc_bfd_coff_final_link (abfd, info) finfo.section_info = NULL; } + /* If we have optimized stabs strings, output them. */ + if (coff_hash_table (info)->stab_info != NULL) + { + if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info)) + return false; + } + /* Write out the string table. */ if (obj_raw_syment_count (abfd) != 0) { @@ -3187,7 +3199,7 @@ TARGET_LITTLE_SYM = (HAS_RELOC | EXEC_P | /* FIXME: object flags */ HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT), + HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED), #ifndef COFF_WITH_PE (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ @@ -3240,7 +3252,7 @@ TARGET_BIG_SYM = (HAS_RELOC | EXEC_P | /* FIXME: object flags */ HAS_LINENO | HAS_DEBUG | - HAS_SYMS | HAS_LOCALS | WP_TEXT), + HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED), #ifndef COFF_WITH_PE (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ -- 2.34.1