aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
AgeCommit message (Collapse)AuthorFilesLines
2001-09-18Touches most files in bfd/, so likely will be blamed for everything..Alan Modra1-50/+59
o bfd_read and bfd_write lose an unnecessary param and become bfd_bread and bfd_bwrite. o bfd_*alloc now all take a bfd_size_type arg, and will error if size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files or bugs in linker scripts etc. o file_ptr becomes a bfd_signed_vma. Besides matching sizes with various other types involved in handling sections, this should make it easier for bfd to support a 64 bit off_t on 32 bit hosts that provide it. o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*) generally available. They now cast their args to bfd_vma and bfd_byte * as appropriate, which removes a swag of casts from the source. o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and aout-encap.c. o Zillions of formatting and -Wconversion fixes.
2001-08-09 * coff-rs6000.c: Add missing prototypes.Alan Modra1-24/+66
(xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow, xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset, xcoff_loader_reloc_offset): Make static. * dwarf1.c: Add missing prototypes. * dwarf2.c: Add missing prototypes. (struct abbrev_info): Move definition. (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise. * elf.c: Add missing prototypes. * elf32-gen.c: Likewise. * elf32-i386.c: Likewise. * elf32-ppc.c: Likewise. (ppc_elf_sort_rela): Use PTR instead of "void *". * elflink.h: Add missing prototypes. Formatting fixes. * merge.c: Add missing prototypes. (last4_eq): Use PTR instead of "void *". (last_eq): Likewise. * syms.c: Add missing prototypes.
2001-08-08* dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.Alexandre Oliva1-2/+82
(find_rela_addend): New function. (parse_comp_unit): Call it to find the abbrev offset addend. (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new members of dwarf2_debug as debugging information is read.
2001-05-21 * dwarf2.c (decode_line_info): Fix error message.Andreas Jaeger1-3/+3
(read_abbrevs): Fix test for offset as suggested by Alan Modra and adjust error message.
2001-03-08Update copyright noticesNick Clifton1-1/+2
2001-01-232001-01-23 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-2/+2
* aoutx.h: Fix formatting. * bfd.c: Likewise. * bfd-in2.h: Likewise. * bfd-in.h: Likewise. * cpu-i386.c: Likewise. * cpu-m68hc11.c: Likewise. * dwarf2.c: Likewise. * elf64-x86-64.c: Likewise. * format.c: Likewise. * freebsd.h: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise.
2000-12-08Generalize DWARF2 and COFF support.Nick Clifton1-25/+30
2000-11-162000-11-16 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-70/+70
* dwarf1.c: Fix formatting. * dwarf2.c: Likewise.
2000-09-02Find all sections containing debug information and include them in the stash.Nick Clifton1-188/+217
2000-04-19K&R compiler fixesAlan Modra1-2/+2
2000-04-07Fix linker segfault that occured when linking ia64-linux kernel.Jim Wilson1-4/+17
* dwarf2.c (struct dwarf2_debug): New field dwarf_line_size. (decode_line_info): Set it. Report error if unit->line_offset is equal to or larger than it.
2000-02-28 * dwarf2.c (read_abbrevs): Use _raw_size directly rather thanIan Lance Taylor1-3/+3
calling bfd_get_section_size_before_reloc. (decode_line_info): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise.
2000-02-23fix typo in previous deltaNick Clifton1-1/+1
2000-02-23Accept 16-bit addresses.Nick Clifton1-11/+13
1999-07-14 * dwarf2.c (read_attribute): Support DW_FORM_ref8.Mark Mitchell1-0/+4
* elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs to possibly_dynamic_relocs. Adjust usage throughout code. (elf_mips_howto_table): Handle R_MIPS_64 correctly. (elf_mips_ctor64_howto): Likewise. (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32. Adjust indentation. (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode. (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32. Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries. * elf64-mips.c (elf_backend_may_use_rel_p): Define.
1999-07-11 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1-11/+11
as appropriate. Fill in structure initializations. Add variable initializations. Add casts. * dwarf1.c (parse_line_table): Change eachLine to unsigned long. (dwarf1_unit_find_nearest_line): Change i to unsigned long.
1999-07-02 * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.Mark Mitchell1-14/+40
(_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter. * elf.c (_bfd_elf_find_nearest_line): Pass it. * elf32-arm.h (elf32_arm_find_nearest_line): Likewise. * elf32-mips.c (ABI_64_P): New macro. (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P. (_bfd_mips_elf_find_nearest_line): Adjust call to _bfd_dwarf2_find_nearest_line. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype. * libbfd.h: Regenerated.
1999-06-26David Mosberger <davidm@hpl.hp.com>Richard Henderson1-54/+93
* dwarf2.c (struct arange): New type. (struct comp_unit): Replace LOW and HIGH by member ARANGE. (arange_add): New function. (decode_line_info): Keep track of address ranges that a compilation unit covers. (comp_unit_contains_address): Return true if address is contained in _any_ of the address ranges associated with a compilation unit. (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line on the first comp_unit that contains the address.
1999-06-26David Mosberger <davidm@hpl.hp.com>Richard Henderson1-4/+9
* dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer. (decode_line_info): Add variable STASH and initialize it to point to the per-bfd dwarf2_debug info. Remove static variable dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
1999-06-10 * dwarf2.c (decode_line_info): Remove unused variable first_time.Ian Lance Taylor1-1/+0
1999-06-03David Mosberger <davidm@hpl.hp.com>Richard Henderson1-30/+110
* dwarf2.c (struct line_info): Add member END_SEQUENCE to keep track of end_sequence markers. (add_line_info): Add END_SEQUENCE arg. (decode_line_info): Don't try to infer lo_pc and hi_pc from the debug-line info---it doesn't work right if a compilation unit consists of multiple discontiguous code-sequences. It would be worthwhile to optimize for the common case where a compilation unit results in a contiguous set of code sequences, but this is quite tricky to get right for arbitrary DWARF2 files. (lookup_address_in_line_info_table): Don't use the last line entry for a compilation unit for anything with an address higher than this line entry. Also, check for end_sequence markers to correctly handle discontinuities. (_bfd_dwarf2_find_nearest_line): When checking previously loaded compilation units, check all compilation units with each->high==0 just like when reading compilation units. * dwarf2.c (decode_line_info): Initialize table->files and table->last_line to NULL to avoid segfaults due to random values in these members. (concat_filename): Check for out-of-range file number before indexing filename table. Segfaults suck. * dwarf2.c (decode_line_info): Don't truncate address to least significant 32 bits (breaks 64 bit targets). (lookup_address_in_function_table): Ditto. (comp_unit_contains_address): Ditto.
1999-05-06Fred Fish <fnf@be.com>Richard Henderson1-2/+2
* dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer assignment from "unsigned char *" to "char *". (decode_line_info): Likewise for dwarf_line_buffer assignment.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+1466