aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
AgeCommit message (Collapse)AuthorFilesLines
2003-02-21Add SHT_IA_64_LOPSREG, SHT_IA_64_HIPSREG and SHT_IA_64_PRIORITY_INIT.Nick Clifton1-2/+44
Add code to display these values in readelf.
2003-02-13Add 'H' to getlongopts so that "readelf -H" does not display "unknown option"Nick Clifton1-1/+1
2003-02-10Add support for marking ARM ELF binaries as support the Cirrus EP9312 MaverickNick Clifton1-0/+4
floating point co-processor.
2003-01-28 * readelf.c (dump_relocations): Reorder the r_info field forRichard Sandiford1-4/+15
little-endian mips elf64. Move #ifdef BFD64 to cover the new code.
2003-01-21(display_debug_loc): Skip address base changes.Nick Clifton1-7/+10
2003-01-17 * readelf.c (get_osabi_name): Handle ELFOSABI_AROS, ELFOSABI_OPENVMSAlan Modra1-0/+3
and ELFOSABI_NSK.
2003-01-16 * readelf.c: Include elf/ppc64.h.Alan Modra1-1/+5
(dump_relocations <EM_PPC64>): Use elf_ppc64_reloc_type. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate.
2003-01-04 * readelf.c (guess_is_rela): Handle EM_IQ2000.Stan Cox1-1/+8
(get_machine_name): Likewise. (dump_relocations): Likewise. * NEWS: Mention IQ2000 support.
2003-01-02 * readelf.c (get_machine_flags): Handle E_MIPS_ARCH_32R2.Richard Sandiford1-1/+2
2002-12-30Add support for msp430.Nick Clifton1-0/+8
2002-12-23 * readelf.c (main): Reset dump request after each file.Andreas Schwab1-1/+29
2002-12-10Add support for displaying extension to DWARF2 used by Unified Parallel CNick Clifton1-0/+8
compiler.
2002-12-07 * readelf.c (process_program_headers): When setting loadaddr, don'tAlan Modra1-112/+117
assume segment size is 4k. Use p_align instead. (loadaddr): Change from int to long. (dynamic_addr, dynamic_info, version_info): Likewise. (process_dynamic_segment <syminsz>): Likewise. (process_dynamic_segment): Adjust print format string. (rela_addr, rela_size): Delete. (process_relocs): Formatting.
2002-11-30s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra1-1216/+1338
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
2002-11-29 * readelf.c Replace occurrences of Elf32_Internal_* andJakub Jelinek1-91/+81
Elf64_Internal_* with Elf_Internal_*. (slurp_rel_relocs): Change Elf_Internal_Rel to Elf_Internal_Rela. Zero r_addend fields. (dump_relocations): Remove relas variable, change Elf_Internal_Rel to Elf_Internal_Rela.
2002-11-14Handle binaries with corrupt section or segment headersNick Clifton1-4/+13
2002-11-07Revert part of previous patch: Display unknown symbol types in decimal, not hex.Nick Clifton1-1/+1
2002-11-06oops - omitted fix to display unknown symbol type in hex.Nick Clifton1-1/+1
2002-11-06Add hex number to PROCESSOR-specific, OS-specific, and reserved symbol types.Nick Clifton1-9/+9
2002-11-04 * readelf.c (byte_get_little_endian): Comment typo fix.Alan Modra1-8/+45
(print_symbol): Constify "symbol" arg. Don't pass "symbol" to printf as the format string. (dump_relocations): Correct section sym names. (process_section_headers): Clear symtab_shndx_hdr. (read_and_display_attr_value): Don't pass indirect string to printf as the format string. (display_debug_frames): Indicate when zero terminator found. Decode DW_EH_PE_pcrel addresses.
2002-10-09 * readelf.c (display_debug_info): Ignore empty .rela.debug_infoDaniel Jacobowitz1-4/+7
sections. Allow relocations against the absolute symbol. Don't use the value in compunit.cu_abbrev_offset if we found a RELA relocation.
2002-10-012002-09-30 H.J. Lu <hjl@gnu.org>H.J. Lu1-1/+4
* readelf.c (get_machine_flags): Handle E_MIPS_MACH_4120, E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
2002-09-12Handle DW_OP_GNU_push_tls_address.Nick Clifton1-8/+13
Synch up with the gcc's dwarf2.h
2002-08-29Remove redundant reference to E_V850EA_ARCH.Nick Clifton1-3/+0
2002-08-20 * readelf.c (parse_args): Change debug_dump_opt to static.Alan Modra1-1/+1
2002-08-17Revert previous delta - it was bogus.Nick Clifton1-2/+0
2002-08-16Put a newline after display an unknown dynamic type.Nick Clifton1-2/+9
2002-08-15 * readelf.c: Include elf/i370.h.Alan Modra1-0/+8
(dump_relocations): Handle EM_S370. (dynamic_segment_parisc_val): Print \n. (process_dynamic_segment <DT_BIND_NOW>): Here too.
2002-07-30 * readelf.c (OPTION_DEBUG_DUMP): Define.Jakub Jelinek1-2/+87
(options): Use it. (usage): Update help. (parse_args): Handle --debug-dump separately from -w. * doc/binutils.texi (readelf): Update documentation.
2002-07-18Add IP2K supportNick Clifton1-0/+10
2002-07-10 * readelf.c (get_dynamic_type): Handle DT_GNU_PRELINKED,Jakub Jelinek1-1/+107
DT_GNU_CONFLICT* and DT_GNU_LIBLISZ*. (get_section_type_name): Handle SHT_GNU_LIBLIST. (process_dynamic_segment): Handle DT_GNU_CONFLICTSZ, DT_GNU_LIBLISTSZ and DT_GNU_PRELINKED. (process_gnu_liblist): New. (process_file): Call it. * elf/common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED, DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define.
2002-07-01include/elf:Jason Thorpe1-1/+15
2002-07-01 Matt Thomas <matt@3am-software.com> * Rename EF_* to EF_VAX_*. bfd: 2002-07-01 Matt Thomas <matt@3am-software.com> * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_* to EF_VAX_*. binutils: 2002-07-01 Matt Thomas <matt@3am-software.com> * readelf.c: Include "elf/vax.h". (guess_is_rela): Move EM_VAX from unknown to RELA case. (dump_relocations): Handle VAX relocations. (get_machine_flags): Handle VAX machine flags.
2002-06-30 * readelf.c (dump_relocations): Handle 68HC11/68HC12 relocations.Stephane Carrez1-0/+6
2002-06-182002-06-18 Dave Brolley <brolley@redhat.com>Dave Brolley1-0/+7
From Catherine Moore: * readelf.c (elf/frv.h): #include it. (guess_is_rela): Support EM_CYGNUS_FRV. (dump_relocations): Ditto. (get_machine_name): Ditto. * Makefile.am (readelf.o): add dependency on $(INCDIR)/elf/frv.h.
2002-06-18binutils/Jakub Jelinek1-6/+9
* readelf.c (get_file_header): Only read the first section header if e_shoff is non-zero. bfd/ * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies e_shnum == 0. Only read the first section header if e_shoff is non-zero. Don't consider e_shstrndx if there are no sections.
2002-06-072002-06-07 H.J. Lu <hjl@gnu.org>H.J. Lu1-9/+47
* readelf.c (DW_CFA_GNU_args_size): Don't define. (DW_CFA_GNU_negative_offset_extended): Likewise. (DW_CFA_GNU_window_save): Likewise. (display_debug_frames): Handle DW_CFA_offset_extended_sf, DW_CFA_def_cfa_sf and DW_CFA_def_cfa_offset_sf.
2002-05-28Add DLX targetNick Clifton1-0/+7
2002-05-27Fix transaltion problems.Nick Clifton1-8/+13
2002-05-23 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCALJakub Jelinek1-7/+19
for symbols from SHF_TLS section. (_bfd_elf_print_private_bfd_data): Add PT_TLS. (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections. (map_sections_to_segments): Build PT_TLS segment if necessary. (assign_file_positions_for_segments): Likewise. (get_program_header_size): Account for PT_TLS segment. (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from SEC_THREAD_LOCAL sections to STT_TLS. * reloc.c: Add 386 and IA-64 TLS relocs. * section.c (SEC_THREAD_LOCAL): Define. (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS): Remove. * elflink.h (elf_link_add_object_symbols): Support .tcommon. (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS unconditionally. (struct elf_final_link_info): Add first_tls_sec. (elf_bfd_final_link): Set first_tls_sec. Compute elf_hash_table (info)->tls_segment. (elf_link_output_extsym): Handle STT_TLS symbols. (elf_link_input_bfd): Likewise. * syms.c (BSF_THREAD_LOCAL): Define. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt. * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff, elf_i386_mkobject, elf_i386_object_p): New functions. (elf_howto_table): Add TLS relocs. (elf_i386_reloc_type_lookup): Support TLS relocs. (elf_i386_info_to_howto_rel): Likewise. (struct elf_i386_link_hash_entry): Add tls_type. (struct elf_i386_obj_tdata): New. (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type): New macros. (struct elf_i386_link_hash_table): Add tls_ldm_got. (link_hash_newfunc): Clear tls_type. (elf_i386_check_relocs): Support TLS relocs. (elf_i386_gc_sweep_hook): Likewise. (allocate_dynrelocs): Likewise. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (bfd_elf32_mkobject, elf_backend_object_p): Define. * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset, dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done, want_tprel, want_dtpmod, want_dtprel. (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions. (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to R_IA64_LTOFF_TPREL22. (elf_code_to_howto_index): Add TLS relocs. (elfNN_ia64_check_relocs): Support TLS relocs. (allocate_global_data_got): Account for TLS .got data. (allocate_dynrel_entries): Account for TLS dynamic relocations. (elfNN_ia64_install_value): Supprt TLS relocs. (set_got_entry): Support TLS relocs. (elfNN_ia64_relocate_section): Likewise. * config/obj-elf.c (elf_common): Renamed from obj_elf_common. (obj_elf_common): Call elf_common. (obj_elf_tls_common): New function. (elf_pseudo_tab): Support .tls_common. (special_sections): Add .tdata and .tbss. (obj_elf_change_section): Set SEC_THREAD_LOCAL for SHF_TLS sections. (obj_elf_parse_section_letters): Support T in section flags (SHF_TLS). (obj_elf_parse_section_letters): Include T in error message. * config/tc-ppc.c (ppc_section_letter): Likewise. * config/tc-alpha.c (alpha_elf_section_letter): Likewise. (tc_gen_reloc): Handle SEC_THREAD_LOCAL the same way as SEC_MERGE. * config/tc-sparc.c (md_apply_fix3): Likewise. * config/tc-i386.c (tc_i386_fix_adjustable): Add TLS relocs. Define them if not BFD_ASSEMBLER. (lex_got): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF, @DTPOFF and @NTPOFF. (md_apply_fix3): Add TLS relocs. * config/tc-ia64.c (enum reloc_func): Add FUNC_DTP_MODULE, FUNC_DTP_RELATIVE, FUNC_TP_RELATIVE, FUNC_LT_DTP_MODULE, FUNC_LT_DTP_RELATIVE, FUNC_LT_TP_RELATIVE. (pseudo_func): Support @dtpmod(), @dtprel() and @tprel(). (ia64_elf_section_letter): Include T in error message. (md_begin): Support TLS operators. (md_operand): Likewise. (ia64_gen_real_reloc_type): Support TLS relocs. * testsuite/gas/i386/tlspic.s: New file. * testsuite/gas/i386/tlsd.s: New file. * testsuite/gas/i386/tlsnopic.s: New file. * testsuite/gas/i386/tlsd.d: New file. * testsuite/gas/i386/tlsnopic.d: New file. * testsuite/gas/i386/tlspic.d: New file. * testsuite/gas/i386/i386.exp: Add tlsd, tlsnopic and tlspic tests. * testsuite/gas/ia64/tls.s: New file. * testsuite/gas/ia64/tls.d: New file. * testsuite/gas/ia64/ia64.exp: Add tls test. * write.c (adjust_reloc_syms): Don't change symbols in SEC_THREAD_LOCAL sections to STT_SECTION + addend. * elf/common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define. * elf/ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22. * elf/i386.h: Add TLS relocs. * scripttempl/elf.sc: Add .rel{,a}.t{bss,data}, .tdata and .tbss. * ldlang.c (lang_add_section): Set SEC_THREAD_LOCAL for output section if necessary. Handle .tbss. (lang_size_sections): Clear _raw_size for .tbss section (it allocates space in PT_TLS segment only). * ldwrite.c (build_link_order): Build link order for .tbss too. * readelf.c (get_segment_type): Add PT_TLS. (get_elf_section_flags): Add SHF_TLS. (get_dynamic_flags): Optimize. Add DF_STATIC_TLS. (process_dynamic_segment): Use puts instead of printf. (get_symbol_type): Support STT_TLS. * objdump.c (dump_section_header): Remove SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS. Add SEC_THREAD_LOCAL.
2002-05-23 * rdcoff.c: Fix formatting.Kazu Hirata1-160/+160
* rddbg.c: Likewise. * readelf.c: Likewise. * rename.c: Likewise. * resbin.c: Likewise. * resrc.c: Likewise. * resres.c: Likewise.
2002-04-252002-04-25 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+1
* readelf.c (get_AT_name): Handle DW_AT_GNU_vector.
2002-04-16Remove unused function fetch_location_list.Nick Clifton1-13/+13
Catch corrupt core notes and display a warning message.
2002-03-212002-03-20 Daniel Berlin <dan@dberlin.org>Daniel Berlin1-3/+140
* readelf.c: Add support for displaying dwarf2 location lists. (do_debug_loc, debug_loc_section, debug_loc_size): New. (parse_args): Use 'O' as shorthand for displaying location list section. (process_section_headers): Handle debug_loc as well. (load_debug_loc): New. (free_debug_loc): New. (fetch_location_list): New. (display_debug_loc): New. (display_debug_info): Call load_debug_loc and free_debug_loc. (debug_displays): We can display .debug_loc now, too. (usage): Update usage string. (read_and_display_attr_value): Note location lists, but don't display them inline.
2002-02-21Fix typo.Nick Clifton1-1/+1
2002-02-20Display 2nd and 3rd reloc types for 64-bit MIPS.Nick Clifton1-24/+87
Narrow some fields for 80-char output.
2002-02-13bfd:Jason Thorpe1-0/+2
2002-02-13 Matt Fredette <fredette@netbsd.org> * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize EF_M68000. bintuls: 2002-02-13 Matt Fredette <fredette@netbsd.org> * readelf.c (get_machine_flags): Recognize EF_M68000. gas: 2002-02-13 Matt Fredette <fredette@netbsd.org> * config/tc-m68k.c (md_show_usage): No longer display a hard-coded "68020" for the default CPU, instead display the canonical name of the true, configured default CPU. (m68k_elf_final_processing): Mark objects for sub-68020 CPUs with the new EF_M68000 flag. include/elf: 2002-02-13 Matt Fredette <fredette@netbsd.org> * m68k.h (EF_M68000): Define.
2002-02-12Add DT_PPC64_OPD and DT_PPC64_OPDSZ dynamic tagsAlan Modra1-0/+2
2002-01-31Add support for OpenRISC 32-bit embedded processorNick Clifton1-19/+29
2002-01-23Tidy up formatting of --help output.Nick Clifton1-27/+30
2002-01-17 * readelf.c (get_machine_name): Handle EM_PPC64.Alan Modra1-0/+2
(guess_is_rela): Here too.