aboutsummaryrefslogtreecommitdiff
path: root/gprof/gmon_io.c
AgeCommit message (Expand)AuthorFilesLines
2023-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2022-05-27Remove use of bfd_uint64_t and similarAlan Modra1-32/+12
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2021-03-31Use bool in gprofAlan Modra1-1/+1
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-04-20update many old style function definitionsTrevor Saunders1-2/+2
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-08-12Remove trailing spaces in gprofH.J. Lu1-4/+4
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-03-05Update copyright yearsAlan Modra1-2/+1
2010-06-16 * gmon_io.c (gmon_out_read): Remove double fclose of input file.Nick Clifton1-2/+0
2010-03-162010-03-16 Segher Boessenkool <segher@kernel.crashing.org>Segher Boessenkool1-0/+3
2009-09-11 * po/bfd.pot: Updated by the Translation project.Nick Clifton1-2/+2
2008-08-25 * gmon_io.h: Don't include sysdep.h here.Alan Modra1-3/+2
2008-08-05 * gmon_io.c (gmon_out_read): When reading old format gmon.out,Brian Dessent1-0/+3
2007-07-06CHange FSF sources over to GPLv3Nick Clifton1-2/+2
2007-04-10 * hist.h (struct histogram)Vladimir Prus1-32/+28
2005-05-09Update the address of the FSFNick Clifton1-2/+2
2005-03-14 * gmon_io.c (gmon_write_raw_arc): Return 1 for invalid size.Alan Modra1-0/+3
2005-03-03update copyright datesAlan Modra1-1/+2
2005-02-22 * basic_blocks.c: Warning fixes.Alan Modra1-7/+8
2004-05-26 * alpha.c, basic_blocks.c, basic_blocks.h, bb_exit_func.c,Ben Elliston1-49/+19
2003-03-312003-03-31 Chris Demetriou <cgd@broadcom.com>Chris Demetriou1-70/+85
2002-11-30s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra1-1/+1
2002-08-20 * gmon_io.c (gmon_io_read_64, gmon_io_write_64): Define only ifAlan Modra1-0/+18
2002-02-01 * alpha.c (alpha_find_call): Warning fixes.Alan Modra1-22/+60
2002-02-01 * basic_blocks.c: Replace bool with boolean, TRUE with true andAlan Modra1-1/+1
2002-01-31Deal with target architecture that have a pointer size that is different fromNick Clifton1-104/+228
2002-01-31 * alpha.c (alpha_Instruction): Don't use.Alan Modra1-2/+4
2002-01-03Remove use of ngettext()Nick Clifton1-6/+9
2002-01-02Fix spelling typo.Nick Clifton1-6/+6
2001-05-16* gmon_io.c (gmon_io_read, gmon_io_write_vma,Alexandre Oliva1-5/+5
2001-03-14David Mosberger's fixes for cross compiling gprof.Alan Modra1-37/+137
2001-03-13Fix typos in ChangeLog; fix dates in copyright noticesNick Clifton1-1/+1
2000-07-24Add GPL copyright notices to uncopyrighted files.Nick Clifton1-56/+67
2000-05-26Eli Zaretskii's DOSish file name patches.Alan Modra1-0/+3
1999-09-24Make sure that sensible values are extracted from a raw header.Nick Clifton1-0/+9
1999-06-30 * Many files: Add casts in many print statements to cast bfd_vmaIan Lance Taylor1-5/+7
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+454
c bfd_boolean MY (write_object_contents) (bfd *abfd) { struct external_exec exec_bytes; struct internal_exec *execp = exec_hdr (abfd); /* We set the reloc type to RELOC_EXT_SIZE, although setting it at all seems unnecessary when inspecting as and ld behavior (not an exhaustive inspection). The default write_object_contents definition sets RELOC_EXT_SIZE, so we follow suite and set it too. */ obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE; /* Setting N_SET_MACHTYPE and using N_SET_FLAGS is not performed by the default definition. */ if (bfd_get_arch (abfd) == bfd_arch_cris) N_SET_MACHTYPE (*execp, M_CRIS); N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags); WRITE_HEADERS (abfd, execp); return TRUE; } /* We need our own for these reasons: - Assert that a normal 8, 16 or 32 reloc is output. - Fix what seems to be a weak-bug (perhaps there for valid reasons). */ static void MY (swap_ext_reloc_out) (bfd *abfd, arelent *g, struct reloc_ext_external *natptr) { int r_index; int r_extern; unsigned int r_type; bfd_vma r_addend; asymbol *sym = *(g->sym_ptr_ptr); asection *output_section = sym->section->output_section; PUT_WORD (abfd, g->address, natptr->r_address); r_type = (unsigned int) g->howto->type; r_addend = g->addend; if ((sym->flags & BSF_SECTION_SYM) != 0) r_addend += (*(g->sym_ptr_ptr))->section->output_section->vma; /* If this relocation is relative to a symbol then set the r_index to the symbols index, and the r_extern bit. Absolute symbols can come in in two ways, either as an offset from the abs section, or as a symbol which has an abs value. check for that here. */ if (bfd_is_abs_section (bfd_get_section (sym))) { r_extern = 0; r_index = N_ABS; } else if ((sym->flags & BSF_SECTION_SYM) == 0) { if (bfd_is_und_section (bfd_get_section (sym)) /* Remember to check for weak symbols; they count as global. */ || (sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0) r_extern = 1; else r_extern = 0; r_index = (*(g->sym_ptr_ptr))->KEEPIT; } else { /* Just an ordinary section. */ r_extern = 0; r_index = output_section->target_index; } /* The relocation type is the same as the canonical ones, but only the first 3 are used: RELOC_8, RELOC_16, RELOC_32. We may change this later, but assert this for the moment. */ if (r_type > 2) { (*_bfd_error_handler) (_("%s: Invalid relocation type exported: %d"), bfd_get_filename (abfd), r_type); bfd_set_error (bfd_error_wrong_format); } /* Now the fun stuff. */ natptr->r_index[2] = r_index >> 16; natptr->r_index[1] = r_index >> 8; natptr->r_index[0] = r_index; natptr->r_type[0] = (r_extern ? RELOC_EXT_BITS_EXTERN_LITTLE : 0) | (r_type << RELOC_EXT_BITS_TYPE_SH_LITTLE); PUT_WORD (abfd, r_addend, natptr->r_addend); } /* We need our own to assert that a normal 8, 16 or 32 reloc is input. */ static void MY (swap_ext_reloc_in) (bfd *abfd, struct reloc_ext_external *bytes, arelent *cache_ptr, asymbol **symbols, bfd_size_type symcount) { unsigned int r_index; int r_extern; unsigned int r_type; struct aoutdata *su = &(abfd->tdata.aout_data->a); cache_ptr->address = (GET_SWORD (abfd, bytes->r_address)); /* Now the fun stuff. */ r_index = (bytes->r_index[2] << 16) | (bytes->r_index[1] << 8) | bytes->r_index[0]; r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE)); r_type = ((bytes->r_type[0]) >> RELOC_EXT_BITS_TYPE_SH_LITTLE) & RELOC_EXT_BITS_TYPE_LITTLE; if (r_type > 2) { (*_bfd_error_handler) (_("%B: Invalid relocation type imported: %d"), abfd, r_type); bfd_set_error (bfd_error_wrong_format); } cache_ptr->howto = howto_table_ext + r_type; if (r_extern && r_index > symcount) { (*_bfd_error_handler) (_("%B: Bad relocation record imported: %d"), abfd, r_index); bfd_set_error (bfd_error_wrong_format); /* We continue, so we can catch further errors. */ r_extern = 0; r_index = N_ABS; } /* Magically uses r_extern, symbols etc. Ugly, but it's what's in the default. */ MOVE_ADDRESS (GET_SWORD (abfd, bytes->r_addend)); } /* We use the same as the default, except that we also set "obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;", to avoid changing NAME (aout, set_arch_mach) in aoutx. */ static bfd_boolean MY (set_sizes) (bfd *abfd) { /* Just as the default in aout-target.h (with some #ifdefs folded)... */ adata (abfd).page_size = TARGET_PAGE_SIZE; adata (abfd).segment_size = SEGMENT_SIZE; adata (abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE; adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE; /* ... except for that we have the extended reloc. The alternative would be to add a check on bfd_arch_cris in NAME (aout, set_arch_mach) in aoutx.h, but I don't want to do that since target-specific things should not be added there. */ obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE; return TRUE; }