├── .cvsignore ├── .gitignore ├── .mtn-ignore ├── ABOUT-NLS ├── AUTHORS ├── COPYING ├── ChangeLog ├── EXCEPTION ├── GPG-KEY ├── Makefile.am ├── NEWS ├── NOTES ├── README ├── THANKS ├── TODO ├── backends ├── ChangeLog ├── Makefile.am ├── alpha_auxv.c ├── alpha_corenote.c ├── alpha_init.c ├── alpha_regs.c ├── alpha_reloc.def ├── alpha_retval.c ├── alpha_symbol.c ├── arm_attrs.c ├── arm_auxv.c ├── arm_corenote.c ├── arm_init.c ├── arm_regs.c ├── arm_reloc.def ├── arm_retval.c ├── arm_symbol.c ├── common-reloc.c ├── i386_auxv.c ├── i386_cfi.c ├── i386_corenote.c ├── i386_init.c ├── i386_regs.c ├── i386_reloc.def ├── i386_retval.c ├── i386_symbol.c ├── i386_syscall.c ├── ia64_init.c ├── ia64_regs.c ├── ia64_reloc.def ├── ia64_retval.c ├── ia64_symbol.c ├── libebl_CPU.h ├── linux-core-note.c ├── ppc64_corenote.c ├── ppc64_init.c ├── ppc64_reloc.def ├── ppc64_retval.c ├── ppc64_symbol.c ├── ppc_attrs.c ├── ppc_auxv.c ├── ppc_corenote.c ├── ppc_init.c ├── ppc_regs.c ├── ppc_reloc.def ├── ppc_retval.c ├── ppc_symbol.c ├── ppc_syscall.c ├── s390_init.c ├── s390_regs.c ├── s390_reloc.def ├── s390_retval.c ├── s390_symbol.c ├── sh_corenote.c ├── sh_init.c ├── sh_regs.c ├── sh_reloc.def ├── sh_retval.c ├── sh_symbol.c ├── sparc64_corenote.c ├── sparc_auxv.c ├── sparc_corenote.c ├── sparc_init.c ├── sparc_regs.c ├── sparc_reloc.def ├── sparc_retval.c ├── sparc_symbol.c ├── x86_64_cfi.c ├── x86_64_corenote.c ├── x86_64_init.c ├── x86_64_regs.c ├── x86_64_reloc.def ├── x86_64_retval.c ├── x86_64_symbol.c ├── x86_64_syscall.c └── x86_corenote.c ├── config ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── elfutils.spec.in ├── eu.am ├── known-dwarf.awk └── version.h.in ├── configure.ac ├── doc ├── .cvsignore ├── ChangeLog ├── Makefile.am └── elfutils.sgml ├── lib ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── crc32.c ├── crc32_file.c ├── dynamicsizehash.c ├── dynamicsizehash.h ├── eu-config.h ├── fixedsizehash.h ├── list.h ├── md5.c ├── md5.h ├── next_prime.c ├── sha1.c ├── sha1.h ├── system.h ├── xmalloc.c ├── xstrdup.c └── xstrndup.c ├── libasm ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── asm_abort.c ├── asm_addint16.c ├── asm_addint32.c ├── asm_addint64.c ├── asm_addint8.c ├── asm_addsleb128.c ├── asm_addstrz.c ├── asm_adduint16.c ├── asm_adduint32.c ├── asm_adduint64.c ├── asm_adduint8.c ├── asm_adduleb128.c ├── asm_align.c ├── asm_begin.c ├── asm_end.c ├── asm_error.c ├── asm_fill.c ├── asm_getelf.c ├── asm_newabssym.c ├── asm_newcomsym.c ├── asm_newscn.c ├── asm_newscn_ingrp.c ├── asm_newscngrp.c ├── asm_newsubscn.c ├── asm_newsym.c ├── asm_scngrp_newsignature.c ├── disasm_begin.c ├── disasm_cb.c ├── disasm_end.c ├── disasm_str.c ├── libasm.h ├── libasm.map ├── libasmP.h ├── symbolhash.c └── symbolhash.h ├── libcpu ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── defs │ ├── i386 │ └── i386.doc ├── i386_data.h ├── i386_disasm.c ├── i386_gendis.c ├── i386_lex.l ├── i386_parse.y ├── memory-access.h └── x86_64_disasm.c ├── libdw ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── cfi.c ├── cfi.h ├── cie.c ├── dwarf.h ├── dwarf_abbrev_hash.c ├── dwarf_abbrev_hash.h ├── dwarf_abbrevhaschildren.c ├── dwarf_addrdie.c ├── dwarf_aggregate_size.c ├── dwarf_arrayorder.c ├── dwarf_attr.c ├── dwarf_attr_integrate.c ├── dwarf_begin.c ├── dwarf_begin_elf.c ├── dwarf_bitoffset.c ├── dwarf_bitsize.c ├── dwarf_bytesize.c ├── dwarf_cfi_addrframe.c ├── dwarf_cfi_end.c ├── dwarf_child.c ├── dwarf_cuoffset.c ├── dwarf_decl_column.c ├── dwarf_decl_file.c ├── dwarf_decl_line.c ├── dwarf_diecu.c ├── dwarf_diename.c ├── dwarf_dieoffset.c ├── dwarf_end.c ├── dwarf_entry_breakpoints.c ├── dwarf_entrypc.c ├── dwarf_error.c ├── dwarf_filesrc.c ├── dwarf_formaddr.c ├── dwarf_formblock.c ├── dwarf_formflag.c ├── dwarf_formref.c ├── dwarf_formref_die.c ├── dwarf_formsdata.c ├── dwarf_formstring.c ├── dwarf_formudata.c ├── dwarf_frame_cfa.c ├── dwarf_frame_info.c ├── dwarf_frame_register.c ├── dwarf_func_inline.c ├── dwarf_getabbrev.c ├── dwarf_getabbrevattr.c ├── dwarf_getabbrevcode.c ├── dwarf_getabbrevtag.c ├── dwarf_getarange_addr.c ├── dwarf_getarangeinfo.c ├── dwarf_getaranges.c ├── dwarf_getattrcnt.c ├── dwarf_getattrs.c ├── dwarf_getcfi.c ├── dwarf_getcfi_elf.c ├── dwarf_getelf.c ├── dwarf_getfuncs.c ├── dwarf_getlocation.c ├── dwarf_getlocation_implicit_pointer.c ├── dwarf_getmacros.c ├── dwarf_getpubnames.c ├── dwarf_getscopes.c ├── dwarf_getscopes_die.c ├── dwarf_getscopevar.c ├── dwarf_getsrc_die.c ├── dwarf_getsrc_file.c ├── dwarf_getsrcdirs.c ├── dwarf_getsrcfiles.c ├── dwarf_getsrclines.c ├── dwarf_getstring.c ├── dwarf_hasattr.c ├── dwarf_hasattr_integrate.c ├── dwarf_haschildren.c ├── dwarf_hasform.c ├── dwarf_haspc.c ├── dwarf_highpc.c ├── dwarf_lineaddr.c ├── dwarf_linebeginstatement.c ├── dwarf_lineblock.c ├── dwarf_linecol.c ├── dwarf_linediscriminator.c ├── dwarf_lineendsequence.c ├── dwarf_lineepiloguebegin.c ├── dwarf_lineisa.c ├── dwarf_lineno.c ├── dwarf_lineop_index.c ├── dwarf_lineprologueend.c ├── dwarf_linesrc.c ├── dwarf_lowpc.c ├── dwarf_macro_opcode.c ├── dwarf_macro_param1.c ├── dwarf_macro_param2.c ├── dwarf_next_cfi.c ├── dwarf_nextcu.c ├── dwarf_offabbrev.c ├── dwarf_offdie.c ├── dwarf_onearange.c ├── dwarf_onesrcline.c ├── dwarf_ranges.c ├── dwarf_siblingof.c ├── dwarf_sig8_hash.c ├── dwarf_sig8_hash.h ├── dwarf_srclang.c ├── dwarf_tag.c ├── dwarf_whatattr.c ├── dwarf_whatform.c ├── encoded-value.h ├── fde.c ├── frame-cache.c ├── libdw.h ├── libdw.map ├── libdwP.h ├── libdw_alloc.c ├── libdw_findcu.c ├── libdw_form.c ├── libdw_visit_scopes.c ├── memory-access.c └── memory-access.h ├── libdwfl ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── argp-std.c ├── bzip2.c ├── core-file.c ├── cu.c ├── derelocate.c ├── dwfl_addrdie.c ├── dwfl_addrdwarf.c ├── dwfl_addrmodule.c ├── dwfl_begin.c ├── dwfl_build_id_find_debuginfo.c ├── dwfl_build_id_find_elf.c ├── dwfl_cumodule.c ├── dwfl_dwarf_line.c ├── dwfl_end.c ├── dwfl_error.c ├── dwfl_getdwarf.c ├── dwfl_getmodules.c ├── dwfl_getsrc.c ├── dwfl_getsrclines.c ├── dwfl_line_comp_dir.c ├── dwfl_linecu.c ├── dwfl_lineinfo.c ├── dwfl_linemodule.c ├── dwfl_module.c ├── dwfl_module_addrdie.c ├── dwfl_module_addrname.c ├── dwfl_module_addrsym.c ├── dwfl_module_build_id.c ├── dwfl_module_dwarf_cfi.c ├── dwfl_module_eh_cfi.c ├── dwfl_module_getdwarf.c ├── dwfl_module_getelf.c ├── dwfl_module_getsrc.c ├── dwfl_module_getsrc_file.c ├── dwfl_module_getsym.c ├── dwfl_module_info.c ├── dwfl_module_nextcu.c ├── dwfl_module_register_names.c ├── dwfl_module_report_build_id.c ├── dwfl_module_return_value_location.c ├── dwfl_nextcu.c ├── dwfl_onesrcline.c ├── dwfl_report_elf.c ├── dwfl_segment_report_module.c ├── dwfl_validate_address.c ├── dwfl_version.c ├── elf-from-memory.c ├── find-debuginfo.c ├── gzip.c ├── image-header.c ├── libdwfl.h ├── libdwflP.h ├── libdwfl_crc32.c ├── libdwfl_crc32_file.c ├── lines.c ├── link_map.c ├── linux-kernel-modules.c ├── linux-proc-maps.c ├── lzma.c ├── offline.c ├── open.c ├── relocate.c └── segment.c ├── libebl ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── ebl-hooks.h ├── ebl_check_special_section.c ├── ebl_check_special_symbol.c ├── ebl_syscall_abi.c ├── eblabicfi.c ├── eblauxvinfo.c ├── eblbackendname.c ├── eblbsspltp.c ├── eblcheckobjattr.c ├── eblclosebackend.c ├── eblcopyrelocp.c ├── eblcorenote.c ├── eblcorenotetypename.c ├── ebldebugscnp.c ├── ebldynamictagcheck.c ├── ebldynamictagname.c ├── eblelfclass.c ├── eblelfdata.c ├── eblelfmachine.c ├── eblgotpcreloccheck.c ├── eblgstrtab.c ├── eblmachineflagcheck.c ├── eblmachineflagname.c ├── eblmachinesectionflagcheck.c ├── eblnonerelocp.c ├── eblobjecttypename.c ├── eblobjnote.c ├── eblobjnotetypename.c ├── eblopenbackend.c ├── eblosabiname.c ├── eblreginfo.c ├── eblrelativerelocp.c ├── eblrelocsimpletype.c ├── eblreloctypecheck.c ├── eblreloctypename.c ├── eblrelocvaliduse.c ├── eblretval.c ├── eblsectionname.c ├── eblsectionstripp.c ├── eblsectiontypename.c ├── eblsegmenttypename.c ├── eblshflagscombine.c ├── eblstother.c ├── eblstrtab.c ├── eblsymbolbindingname.c ├── eblsymboltypename.c ├── eblsysvhashentrysize.c ├── eblwstrtab.c ├── libebl.h └── libeblP.h ├── libelf ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── abstract.h ├── common.h ├── dl-hash.h ├── elf-knowledge.h ├── elf.h ├── elf32_checksum.c ├── elf32_fsize.c ├── elf32_getehdr.c ├── elf32_getphdr.c ├── elf32_getshdr.c ├── elf32_newehdr.c ├── elf32_newphdr.c ├── elf32_offscn.c ├── elf32_updatefile.c ├── elf32_updatenull.c ├── elf32_xlatetof.c ├── elf32_xlatetom.c ├── elf64_checksum.c ├── elf64_fsize.c ├── elf64_getehdr.c ├── elf64_getphdr.c ├── elf64_getshdr.c ├── elf64_newehdr.c ├── elf64_newphdr.c ├── elf64_offscn.c ├── elf64_updatefile.c ├── elf64_updatenull.c ├── elf64_xlatetof.c ├── elf64_xlatetom.c ├── elf_begin.c ├── elf_clone.c ├── elf_cntl.c ├── elf_end.c ├── elf_error.c ├── elf_fill.c ├── elf_flagdata.c ├── elf_flagehdr.c ├── elf_flagelf.c ├── elf_flagphdr.c ├── elf_flagscn.c ├── elf_flagshdr.c ├── elf_getarhdr.c ├── elf_getaroff.c ├── elf_getarsym.c ├── elf_getbase.c ├── elf_getdata.c ├── elf_getdata_rawchunk.c ├── elf_getident.c ├── elf_getphdrnum.c ├── elf_getscn.c ├── elf_getshdrnum.c ├── elf_getshdrstrndx.c ├── elf_gnu_hash.c ├── elf_hash.c ├── elf_kind.c ├── elf_memory.c ├── elf_ndxscn.c ├── elf_newdata.c ├── elf_newscn.c ├── elf_next.c ├── elf_nextscn.c ├── elf_rand.c ├── elf_rawdata.c ├── elf_rawfile.c ├── elf_readall.c ├── elf_scnshndx.c ├── elf_strptr.c ├── elf_update.c ├── elf_version.c ├── exttypes.h ├── gelf.h ├── gelf_checksum.c ├── gelf_fsize.c ├── gelf_getauxv.c ├── gelf_getclass.c ├── gelf_getdyn.c ├── gelf_getehdr.c ├── gelf_getlib.c ├── gelf_getmove.c ├── gelf_getnote.c ├── gelf_getphdr.c ├── gelf_getrel.c ├── gelf_getrela.c ├── gelf_getshdr.c ├── gelf_getsym.c ├── gelf_getsyminfo.c ├── gelf_getsymshndx.c ├── gelf_getverdaux.c ├── gelf_getverdef.c ├── gelf_getvernaux.c ├── gelf_getverneed.c ├── gelf_getversym.c ├── gelf_newehdr.c ├── gelf_newphdr.c ├── gelf_offscn.c ├── gelf_update_auxv.c ├── gelf_update_dyn.c ├── gelf_update_ehdr.c ├── gelf_update_lib.c ├── gelf_update_move.c ├── gelf_update_phdr.c ├── gelf_update_rel.c ├── gelf_update_rela.c ├── gelf_update_shdr.c ├── gelf_update_sym.c ├── gelf_update_syminfo.c ├── gelf_update_symshndx.c ├── gelf_update_verdaux.c ├── gelf_update_verdef.c ├── gelf_update_vernaux.c ├── gelf_update_verneed.c ├── gelf_update_versym.c ├── gelf_xlate.c ├── gelf_xlate.h ├── gelf_xlatetof.c ├── gelf_xlatetom.c ├── gnuhash_xlate.h ├── libelf.h ├── libelf.map ├── libelfP.h ├── libelf_crc32.c ├── libelf_next_prime.c ├── nlist.c ├── nlist.h ├── note_xlate.h └── version_xlate.h ├── m4 ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── codeset.m4 ├── gettext.m4 ├── iconv.m4 ├── lcmessage.m4 ├── nls.m4 ├── po.m4 ├── progtest.m4 └── zip.m4 ├── po ├── .cvsignore ├── ChangeLog ├── LINGUAS ├── Makefile.in.in ├── Makevars ├── POTFILES.in ├── Rules-quot ├── boldquot.sed ├── de.po ├── en@boldquot.header ├── en@quot.header ├── es.po ├── fr.po ├── insert-header.sin ├── it.po ├── ja.po ├── nl.po ├── pl.po ├── quot.sed ├── remove-potcdate.sin ├── ru.po ├── uk.po └── zh_CN.po ├── src ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── addr2line.c ├── ar.c ├── arlib.c ├── arlib.h ├── arlib2.c ├── debugpred.h ├── elf32-i386.script ├── elfcmp.c ├── elflint.c ├── findtextrel.c ├── i386_ld.c ├── ld.c ├── ld.h ├── ldgeneric.c ├── ldlex.l ├── ldscript.y ├── libld_elf_i386.map ├── make-debug-archive.in ├── nm.c ├── none_ld.c ├── objdump.c ├── ranlib.c ├── readelf.c ├── sectionhash.c ├── sectionhash.h ├── size.c ├── strings.c ├── strip.c ├── symbolhash.c ├── symbolhash.h ├── unaligned.h ├── unstrip.c ├── versionhash.c ├── versionhash.h ├── xelf.h └── ylwrap └── tests ├── .cvsignore ├── ChangeLog ├── Makefile.am ├── addrcfi.c ├── addrscopes.c ├── alldts.c ├── allfcts.c ├── allregs.c ├── arextract.c ├── arls.c ├── arsymtest.c ├── asm-tst1.c ├── asm-tst2.c ├── asm-tst3.c ├── asm-tst4.c ├── asm-tst5.c ├── asm-tst6.c ├── asm-tst7.c ├── asm-tst8.c ├── asm-tst9.c ├── configure.ac ├── coverage.sh ├── dwarf-getmacros.c ├── dwarf-getstring.c ├── dwfl-addr-sect.c ├── dwfl-bug-addr-overflow.c ├── dwfl-bug-fd-leak.c ├── dwfl-bug-getmodules.c ├── dwfl-bug-report.c ├── dwflmodtest.c ├── early-offscn.c ├── ecp.c ├── find-prologues.c ├── funcretval.c ├── funcscopes.c ├── get-aranges.c ├── get-files.c ├── get-lines.c ├── get-pubnames.c ├── hash.c ├── hello_i386.ko.bz2 ├── hello_ppc64.ko.bz2 ├── hello_s390.ko.bz2 ├── hello_x86_64.ko.bz2 ├── line2addr.c ├── md5-sha1-test.c ├── msg_tst.c ├── newfile.c ├── newscn.c ├── rdwrmmap.c ├── rerequest_tag.c ├── run-addrname-test.sh ├── run-addrscopes.sh ├── run-alldts.sh ├── run-allfcts.sh ├── run-allregs.sh ├── run-arextract.sh ├── run-arsymtest.sh ├── run-bug1-test.sh ├── run-disasm-x86-64.sh ├── run-disasm-x86.sh ├── run-dwarf-getmacros.sh ├── run-dwarf-getstring.sh ├── run-dwfl-addr-sect.sh ├── run-dwfl-bug-offline-rel.sh ├── run-early-offscn.sh ├── run-ecp-test.sh ├── run-ecp-test2.sh ├── run-elflint-self.sh ├── run-elflint-test.sh ├── run-find-prologues.sh ├── run-funcscopes.sh ├── run-get-aranges.sh ├── run-get-files.sh ├── run-get-lines.sh ├── run-get-pubnames.sh ├── run-line2addr.sh ├── run-native-test.sh ├── run-prelink-addr-test.sh ├── run-ranlib-test.sh ├── run-ranlib-test2.sh ├── run-ranlib-test3.sh ├── run-ranlib-test4.sh ├── run-readelf-test1.sh ├── run-readelf-test2.sh ├── run-readelf-test3.sh ├── run-readelf-test4.sh ├── run-readelf-twofiles.sh ├── run-rerequest_tag.sh ├── run-show-abbrev.sh ├── run-show-ciefde.sh ├── run-show-die-info.sh ├── run-strings-test.sh ├── run-strip-groups.sh ├── run-strip-reloc.sh ├── run-strip-test.sh ├── run-strip-test2.sh ├── run-strip-test3.sh ├── run-strip-test4.sh ├── run-strip-test5.sh ├── run-strip-test6.sh ├── run-strip-test7.sh ├── run-strip-test8.sh ├── run-test-flag-nobits.sh ├── run-unstrip-test.sh ├── run-unstrip-test2.sh ├── saridx.c ├── scnnames.c ├── sectiondump.c ├── show-abbrev.c ├── show-ciefde.c ├── show-die-info.c ├── showptable.c ├── test-flag-nobits.c ├── test-nlist.c ├── test-subr.sh ├── test-wrapper.sh ├── testfile.bz2 ├── testfile10.bz2 ├── testfile11.bz2 ├── testfile12.bz2 ├── testfile13.bz2 ├── testfile14.bz2 ├── testfile15.bz2 ├── testfile15.debug.bz2 ├── testfile16.bz2 ├── testfile16.debug.bz2 ├── testfile17.bz2 ├── testfile17.debug.bz2 ├── testfile18.bz2 ├── testfile19.bz2 ├── testfile19.index.bz2 ├── testfile2.bz2 ├── testfile20.bz2 ├── testfile20.index.bz2 ├── testfile21.bz2 ├── testfile21.index.bz2 ├── testfile22.bz2 ├── testfile23.bz2 ├── testfile24.bz2 ├── testfile25.bz2 ├── testfile26.bz2 ├── testfile27.bz2 ├── testfile28.bz2 ├── testfile28.rdwr.bz2 ├── testfile29.bz2 ├── testfile29.rdwr.bz2 ├── testfile3.bz2 ├── testfile30.bz2 ├── testfile31.bz2 ├── testfile32.bz2 ├── testfile33.bz2 ├── testfile34.bz2 ├── testfile35.bz2 ├── testfile35.debug.bz2 ├── testfile36.bz2 ├── testfile36.debug.bz2 ├── testfile37.bz2 ├── testfile37.debug.bz2 ├── testfile38.bz2 ├── testfile39.bz2 ├── testfile4.bz2 ├── testfile40.bz2 ├── testfile40.debug.bz2 ├── testfile41.bz2 ├── testfile42.bz2 ├── testfile43.bz2 ├── testfile44.S.bz2 ├── testfile44.expect.bz2 ├── testfile45.S.bz2 ├── testfile45.expect.bz2 ├── testfile46.bz2 ├── testfile47.bz2 ├── testfile48.bz2 ├── testfile48.debug.bz2 ├── testfile49.bz2 ├── testfile5.bz2 ├── testfile50.bz2 ├── testfile51.bz2 ├── testfile52-32.noshdrs.so.bz2 ├── testfile52-32.prelink.so.bz2 ├── testfile52-32.so.bz2 ├── testfile52-32.so.debug.bz2 ├── testfile52-64.noshdrs.so.bz2 ├── testfile52-64.prelink.so.bz2 ├── testfile52-64.so.bz2 ├── testfile52-64.so.debug.bz2 ├── testfile53-32.bz2 ├── testfile53-32.debug.bz2 ├── testfile53-32.prelink.bz2 ├── testfile53-64.bz2 ├── testfile53-64.debug.bz2 ├── testfile53-64.prelink.bz2 ├── testfile54-32.noshdrs.so.bz2 ├── testfile54-32.prelink.so.bz2 ├── testfile54-32.so.bz2 ├── testfile54-32.so.debug.bz2 ├── testfile54-64.noshdrs.so.bz2 ├── testfile54-64.prelink.so.bz2 ├── testfile54-64.so.bz2 ├── testfile54-64.so.debug.bz2 ├── testfile55-32.bz2 ├── testfile55-32.debug.bz2 ├── testfile55-32.prelink.bz2 ├── testfile55-64.bz2 ├── testfile55-64.debug.bz2 ├── testfile55-64.prelink.bz2 ├── testfile56.bz2 ├── testfile57.bz2 ├── testfile58.bz2 ├── testfile6.bz2 ├── testfile7.bz2 ├── testfile8.bz2 ├── testfile9.bz2 ├── update1.c ├── update2.c ├── update3.c └── update4.c /.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | aclocal.m4 3 | autom4te.cache 4 | config.h.in 5 | configure 6 | elfutils.spec 7 | osl2.0 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | #* 3 | *# 4 | .#* 5 | =* 6 | .glimpse_* 7 | autom4te.* 8 | *.o 9 | *.so 10 | *.a 11 | *.orig 12 | *.patch 13 | *.rej 14 | Makefile.in 15 | */Makefile.in 16 | aclocal.m4 17 | INSTALL 18 | config.h.in 19 | config/config.guess 20 | config/config.sub 21 | config/depcomp 22 | config/install-sh 23 | config/missing 24 | config/ylwrap 25 | configure 26 | elfutils.spec 27 | *.pot 28 | *.gmo 29 | po/en@boldquot.po 30 | po/en@quot.po 31 | libdw/known-dwarf.h 32 | -------------------------------------------------------------------------------- /.mtn-ignore: -------------------------------------------------------------------------------- 1 | ^INSTALL$ 2 | Makefile\.in$ 3 | aclocal\.m4$ 4 | config\.h\.in$ 5 | elfutils\.spec$ 6 | configure$ 7 | .*\.pot$ 8 | config/config\.guess$ 9 | config/config\.sub$ 10 | config/depcomp$ 11 | config/install-sh$ 12 | config/missing$ 13 | config/ylwrap$ 14 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | For Now: 2 | Ulrich Drepper. 3 | Roland McGrath 4 | Petr Machata 5 | -------------------------------------------------------------------------------- /EXCEPTION: -------------------------------------------------------------------------------- 1 | This file describes the limits of the Exception under which you are allowed 2 | to distribute Non-GPL Code in linked combination with Red Hat elfutils. 3 | For the full text of the license, please see one of the header files 4 | included with the source distribution or the file COPYING found in the 5 | top level directory of the source. 6 | 7 | The Approved Interfaces are the functions declared in the files: 8 | 9 | libelf.h 10 | libdw.h 11 | libdwfl.h 12 | -------------------------------------------------------------------------------- /GPG-KEY: -------------------------------------------------------------------------------- 1 | Public key for drepper@redhat.com 2 | -----BEGIN PGP PUBLIC KEY BLOCK----- 3 | Version: GnuPG v1.2.1 (GNU/Linux) 4 | 5 | mQGiBDuFth0RBACPcHEkyqJE26wTXuuuCxpqJjxlBnNFkJGkWUoeu89QjzWgzXy/ 6 | EA8+ptNBgCTPKnLEqhkRUyxAT/Uz+t+xbKqUtL54IzYfxO4NQsN/VVM0uppNfIJb 7 | MWvAjvpp2HCkd/32i693rlH+G9dvG8K57by3PBRHBgH2L8Q7t/QvA2AWpwCgzokX 8 | DDUiitysGn4rWO0rBBoR6OED/3ehpcHtbGixNoubRZAxpw99VTKs/I76OkrQzqcm 9 | +w+zwZeihJXC88yAHA77/LBB3YKaX3G4CmDQUbeRJ9zPlETTLmRMcF61dQdq/3qV 10 | Biq1sm6ctZ4uEpm8HnysKMT+VY4Xmj9LLzF2BdING9frcX9rk8Vk25iCLBronS0M 11 | IU3WA/sEvlUFlfbyCBRBoq+Rlr9u05fnHc7CLMKI7EIS1T1dLPxH1ivuUhyYNGAM 12 | RhCivBbT2Z0t/R4ksu3VdnPGkCyAAdWNSafSGqCYUzQH0u5Z8HK6c2iXrIX3Ipk5 13 | DhQOQ6k1tyYzuQw3cCf7RYRJ9/iup8RlscVt2kmGnSucqpxJCbQjVWxyaWNoIERy 14 | ZXBwZXIgPGRyZXBwZXJAcmVkaGF0LmNvbT6IVwQTEQIAFwUCO4W2HQULBwoDBAMV 15 | AwIDFgIBAheAAAoJENoowjp5/0R0SqUAoL5HBbaRWR19vjldUeJvYCG2AR94AKDL 16 | nmVEaykaZWyyNg0OTuxLe1boa4hGBBARAgAGBQI8iQDvAAoJEFWW3Qzpv2U97wgA 17 | n1RVl6FbIHVVmT224nOp5b98OZVnAJ9ehXzM60RbmGi3kJNS30II+SGft4hGBBMR 18 | AgAGBQI9Tvt0AAoJEP3S3qzTM8uhUy0AoNqATBj2usEtJduGHukKZ9mQaycFAJ9y 19 | lq0MmZJwMZ3699e6rgMiHAMAVbkCDQQ7hbZPEAgAzuFAPq1sYUtpJClwX7+pdz1K 20 | dIgbxDKoSHh2rSRx24HLYY/xg9ps6fZF21/SBialKaB8BFnIeh8S9LXUtWt9aUeC 21 | klnnQwPbR0BGRcZAS7+nHZ9agiMd4CRe4RWFmS6KhIeUsDa70+8XhIm/C+Ogd7ag 22 | kBw7ykTb/jWHMyvcP9iY0QtmIatfVTDJUm7Rm5TtM1mDCml/gWIQJ5ezr9gv2NUG 23 | 3kpNYwP+G9o4BLyTOHamix/0YHI/HiZSYiwq40ao0zROd/yXY6/a3mitN96AidJL 24 | 5I5tbqnrFy6LmRvWmyOxWkJD/bF31rrO5PfVUgcVpUxbtW44PtVilhLuh+qjTwAD 25 | BQf+NTHwjUw1j+PZs/y5XnPw0x0ZdYGEl0I7NqtMgCxI4ZHT9jaLcLXARb3UVEuc 26 | 1LuJ1tAA1ss1c1NLK3Lg+uZzeKMRffRYEUg0Emer8QGWr1uSOxDHcAzuRZX3PYNX 27 | cEGEyEm443DDnXr/4b8zYK6O+sy1Ld+SVxxp6jwtk0LyT7okgD0E1dDUzX+qxpsV 28 | ujbzdH4bdqocKouMNMT+BHeobNZpR4Tyz5+pwW+rw1+XZebyBUkIPXOoWPZpUTDG 29 | fZ+om9xfg0JOcKZIZ0X91dLQp5x99aCmzwWeWy9LFPTAf9pYky8wXzteEotE/Tkm 30 | DeA1caPC9IEK9BBrrS9TeubrEIhGBBgRAgAGBQI7hbZPAAoJENoowjp5/0R0Z38A 31 | mgM4FAquwltH0ooTdAmBMoCfKb4/AJ9ufAh4Rl9sFaCie/j8jdo02bcV1A== 32 | =Yeua 33 | -----END PGP PUBLIC KEY BLOCK----- 34 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to create Makefile.in 2 | ## Configure input file for elfutils. 3 | ## 4 | ## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2008, 2009 Red Hat, Inc. 5 | ## This file is part of Red Hat elfutils. 6 | ## 7 | ## Red Hat elfutils is free software; you can redistribute it and/or modify 8 | ## it under the terms of the GNU General Public License as published by the 9 | ## Free Software Foundation; version 2 of the License. 10 | ## 11 | ## Red Hat elfutils is distributed in the hope that it will be useful, but 12 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU General Public License along 17 | ## with Red Hat elfutils; if not, write to the Free Software Foundation, 18 | ## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 19 | ## 20 | ## Red Hat elfutils is an included package of the Open Invention Network. 21 | ## An included package of the Open Invention Network is a package for which 22 | ## Open Invention Network licensees cross-license their patents. No patent 23 | ## license is granted, either expressly or impliedly, by designation as an 24 | ## included package. Should you wish to participate in the Open Invention 25 | ## Network licensing program, please visit www.openinventionnetwork.com 26 | ## . 27 | ## 28 | ACLOCAL_AMFLAGS = -I m4 29 | 30 | pkginclude_HEADERS = version.h 31 | 32 | # Add doc back when we have some real content. 33 | SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \ 34 | src po tests 35 | 36 | EXTRA_DIST = elfutils.spec GPG-KEY NOTES EXCEPTION 37 | 38 | # Make sure the test install uses lib64 when $LIB will yield lib64. 39 | # Make sure the test build uses the same compiler, which on e.g. ppc64 40 | # determines which platform we are actually testing. 41 | DISTCHECK_CONFIGURE_FLAGS = \ 42 | --libdir=`echo $(libdir) | sed "s,^$(exec_prefix),$$dc_install_base,"`\ 43 | CC="$(CC)" 44 | 45 | distcheck-hook: 46 | chmod -R u+w $(distdir) 47 | 48 | rpm: dist 49 | rpmbuild -ts --sign elfutils-@PACKAGE_VERSION@.tar.bz2 50 | 51 | # Tell version 3.79 and up of GNU make to not build goals in this 52 | # directory in parallel. 53 | .NOTPARALLEL: 54 | -------------------------------------------------------------------------------- /NOTES: -------------------------------------------------------------------------------- 1 | - old GNU ld's behavior wrt DSOs seems to be severely broken. 2 | 3 | y.o reference foo() 4 | y1.o defines foo(), references bar() 5 | y2.o defines bar() 6 | libbar.so defines bar() 7 | 8 | Running 9 | 10 | gcc -o y y.o -lbar y1.o y2.o 11 | 12 | uses the bar() definition from libbar.so and does not mention the definition 13 | in y2.o at all (no duplicate symbol message). Correct is to use the 14 | definition in y2.o. 15 | 16 | 17 | y.o reference foo() 18 | y1.o defines foo(), references bar() 19 | y2.o in liby2.a defines bar() 20 | libbar.so defines bar() 21 | 22 | Running 23 | 24 | gcc -o y y.o -lbar y1.o -ly3 25 | 26 | has to use the definition in -lbar and not pull the definition from liby3.a. 27 | 28 | 29 | - the old linker follows DT_NEEDED entries and adds the objects referenced 30 | this way which define a symbol which is needed as a DT_NEEDED to the 31 | generated binary. This is wrong since the DT_NEEDED changes the search 32 | path in the object (which is breadth first). 33 | 34 | 35 | - the old linker supported extern "C++", extern "java" in version scripts. 36 | I believe this implementation is severly broken and needs a redesign 37 | (how do wildcards work with these languages*?). Therefore it is left 38 | out for now. 39 | 40 | 41 | - what should happen if two sections in different files with the same 42 | name have different types and/or the flags are different 43 | 44 | 45 | - section names in input files are mostly irrelevant. Exceptions: 46 | 47 | .comment/SHT_PROGBITS in strip, ld 48 | 49 | .debug \ 50 | .line | 51 | .debug_srcinfo | 52 | .debug_sfnames | 53 | .debug_aranges | 54 | .debug_pubnames | 55 | .debug_info | 56 | .debug_abbrev | 57 | .debug_line | 58 | .debug_abbrev > DWARF sections in ld 59 | .debug_line | 60 | .debug_frame | 61 | .debug_str | 62 | .debug_loc | 63 | .debug_macinfo | 64 | .debug_weaknames | 65 | .debug_funcnames | 66 | .debug_typenames | 67 | .debug_varnames / 68 | 69 | Sections created in output files follow the naming of special section 70 | from the gABI. 71 | 72 | In no place is a section solely indentified by its name. Internal 73 | references always use the section index. 74 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Fundamental design decision: 2 | 3 | - the sizes of external and internal types are assumed to be the same. 4 | This leaves byte ordering aside. While assuming this the code can be 5 | greatly simplified and speed increases. Since no change violating this 6 | assumption is in sight this is believed to be a worthwhile optimization. 7 | 8 | - the ABI of the backend modules is not guaranteed. Really, not guarantee 9 | whatsoever. We are enforcing this in the code. The modules and their 10 | users must match. No third-party EBL module are supported or allowed. 11 | The only reason there are separate modules is to not have the code for 12 | all architectures in all the binaries. 13 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | At least the following have submitted valuable patches: 2 | 3 | Jeff Johnson building. rpm wrestling 4 | Alexander Larsson separate debug info 5 | Jakub Jelinek bug fixes, testing 6 | Denys Vlasenko bug fuxes 7 | -------------------------------------------------------------------------------- /backends/alpha_auxv.c: -------------------------------------------------------------------------------- 1 | /* Alpha-specific auxv handling. 2 | Copyright (C) 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND alpha_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | EBLHOOK(auxv_info) (GElf_Xword a_type, const char **name, const char **format) 35 | { 36 | if (a_type != AT_HWCAP) 37 | return 0; 38 | 39 | *name = "HWCAP"; 40 | *format = "b" 41 | "bwx\0" "fix\0" "cix\0" "0x08\0" 42 | "0x10\0" "0x20\0" "0x40\0" "0x80\0" 43 | "max\0" "precise_trap\0" 44 | "\0"; 45 | return 1; 46 | } 47 | -------------------------------------------------------------------------------- /backends/arm_auxv.c: -------------------------------------------------------------------------------- 1 | /* ARM-specific auxv handling. 2 | Copyright (C) 2009 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND arm_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | EBLHOOK(auxv_info) (GElf_Xword a_type, const char **name, const char **format) 35 | { 36 | if (a_type != AT_HWCAP) 37 | return 0; 38 | 39 | *name = "HWCAP"; 40 | *format = "b" 41 | "swp\0" "half\0" "thumb\0" "26bit\0" 42 | "fast-mult\0" "fpa\0" "vfp\0" "edsp\0" 43 | "java\0" "iwmmxt\0" 44 | "\0"; 45 | return 1; 46 | } 47 | -------------------------------------------------------------------------------- /backends/i386_auxv.c: -------------------------------------------------------------------------------- 1 | /* i386 specific auxv handling. 2 | Copyright (C) 2007 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND i386_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | EBLHOOK(auxv_info) (GElf_Xword a_type, const char **name, const char **format) 35 | { 36 | if (a_type != AT_HWCAP) 37 | return 0; 38 | 39 | *name = "HWCAP"; 40 | *format = "b" 41 | "fpu\0" "vme\0" "de\0" "pse\0" "tsc\0" "msr\0" "pae\0" "mce\0" 42 | "cx8\0" "apic\0" "10\0" "sep\0" "mtrr\0" "pge\0" "mca\0" "cmov\0" 43 | "pat\0" "pse36\0" "pn\0" "clflush\0" "20\0" "dts\0" "acpi\0" "mmx\0" 44 | "fxsr\0" "sse\0" "sse2\0" "ss\0" "ht\0" "tm\0" "ia64\0" "pbe\0" "\0"; 45 | return 1; 46 | } 47 | 48 | __typeof (i386_auxv_info) x86_64_auxv_info 49 | __attribute__ ((alias ("i386_auxv_info"))); 50 | -------------------------------------------------------------------------------- /backends/i386_syscall.c: -------------------------------------------------------------------------------- 1 | /* Linux/i386 system call ABI in DWARF register numbers. 2 | Copyright (C) 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND i386_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | i386_syscall_abi (Ebl *ebl __attribute__ ((unused)), 35 | int *sp, int *pc, int *callno, int args[6]) 36 | { 37 | *sp = 4; /* %esp */ 38 | *pc = 8; /* %eip */ 39 | *callno = 0; /* %eax */ 40 | args[0] = 3; /* %ebx */ 41 | args[1] = 1; /* %ecx */ 42 | args[2] = 2; /* %edx */ 43 | args[3] = 6; /* %esi */ 44 | args[4] = 7; /* %edi */ 45 | args[5] = 5; /* %ebp */ 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /backends/libebl_CPU.h: -------------------------------------------------------------------------------- 1 | /* Common interface for libebl modules. 2 | Copyright (C) 2000, 2001, 2002, 2003, 2005 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifndef _LIBEBL_CPU_H 27 | #define _LIBEBL_CPU_H 1 28 | 29 | #include 30 | 31 | #define EBLHOOK(name) EBLHOOK_1(BACKEND, name) 32 | #define EBLHOOK_1(a, b) EBLHOOK_2(a, b) 33 | #define EBLHOOK_2(a, b) a##b 34 | 35 | /* Constructor. */ 36 | extern const char *EBLHOOK(init) (Elf *elf, GElf_Half machine, 37 | Ebl *eh, size_t ehlen); 38 | 39 | #include "ebl-hooks.h" 40 | 41 | #define HOOK(eh, name) eh->name = EBLHOOK(name) 42 | 43 | extern bool (*generic_debugscn_p) (const char *) attribute_hidden; 44 | 45 | 46 | #endif /* libebl_CPU.h */ 47 | -------------------------------------------------------------------------------- /backends/ppc64_corenote.c: -------------------------------------------------------------------------------- 1 | #define BITS 64 2 | #include "ppc_corenote.c" 3 | -------------------------------------------------------------------------------- /backends/ppc_auxv.c: -------------------------------------------------------------------------------- 1 | /* i386 specific auxv handling. 2 | Copyright (C) 2007 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND ppc_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | EBLHOOK(auxv_info) (GElf_Xword a_type, const char **name, const char **format) 35 | { 36 | if (a_type != AT_HWCAP) 37 | return 0; 38 | 39 | *name = "HWCAP"; 40 | *format = "b" 41 | "ppcle\0" "truele\0" "3\0" "4\0" "5\0" "6\0" "7\0" "8\0" "9\0" 42 | "power6x\0" "dfp\0" "pa6t\0" "arch_2_05\0" 43 | "ic_snoop\0" "smt\0" "booke\0" "cellbe\0" 44 | "power5+\0" "power5\0" "power4\0" "notb\0" 45 | "efpdouble\0" "efpsingle\0" "spe\0" "ucache\0" 46 | "4xxmac\0" "mmu\0" "fpu\0" "altivec\0" 47 | "ppc601\0" "ppc64\0" "ppc32\0" "\0"; 48 | return 1; 49 | } 50 | 51 | __typeof (ppc_auxv_info) ppc64_auxv_info 52 | __attribute__ ((alias ("ppc_auxv_info"))); 53 | -------------------------------------------------------------------------------- /backends/ppc_syscall.c: -------------------------------------------------------------------------------- 1 | /* Linux/PPC system call ABI in DWARF register numbers. 2 | Copyright (C) 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND ppc_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | ppc_syscall_abi (Ebl *ebl __attribute__ ((unused)), 35 | int *sp, int *pc, int *callno, int args[6]) 36 | { 37 | *sp = 1; 38 | *pc = -1; 39 | *callno = 0; 40 | args[0] = 3; 41 | args[1] = 4; 42 | args[2] = 5; 43 | args[3] = 6; 44 | args[4] = 7; 45 | args[5] = 8; 46 | return 0; 47 | } 48 | 49 | __typeof (ppc_syscall_abi) 50 | ppc64_syscall_abi __attribute__ ((alias ("ppc_syscall_abi"))); 51 | -------------------------------------------------------------------------------- /backends/s390_init.c: -------------------------------------------------------------------------------- 1 | /* Initialization of S/390 specific backend library. 2 | Copyright (C) 2005, 2006 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND s390_ 31 | #define RELOC_PREFIX R_390_ 32 | #include "libebl_CPU.h" 33 | 34 | /* This defines the common reloc hooks based on arm_reloc.def. */ 35 | #include "common-reloc.c" 36 | 37 | 38 | const char * 39 | s390_init (elf, machine, eh, ehlen) 40 | Elf *elf __attribute__ ((unused)); 41 | GElf_Half machine __attribute__ ((unused)); 42 | Ebl *eh; 43 | size_t ehlen; 44 | { 45 | /* Check whether the Elf_BH object has a sufficent size. */ 46 | if (ehlen < sizeof (Ebl)) 47 | return NULL; 48 | 49 | /* We handle it. */ 50 | eh->name = "IBM S/390"; 51 | s390_init_reloc (eh); 52 | HOOK (eh, reloc_simple_type); 53 | HOOK (eh, register_info); 54 | HOOK (eh, return_value_location); 55 | 56 | /* Only the 64-bit format uses the incorrect hash table entry size. */ 57 | if (eh->class == ELFCLASS64) 58 | eh->sysvhash_entrysize = sizeof (Elf64_Xword); 59 | 60 | return MODVERSION; 61 | } 62 | -------------------------------------------------------------------------------- /backends/s390_symbol.c: -------------------------------------------------------------------------------- 1 | /* S/390-specific symbolic name handling. 2 | Copyright (C) 2005 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #include 31 | #include 32 | 33 | #define BACKEND s390_ 34 | #include "libebl_CPU.h" 35 | 36 | /* Check for the simple reloc types. */ 37 | Elf_Type 38 | s390_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) 39 | { 40 | switch (type) 41 | { 42 | case R_390_64: 43 | return ELF_T_SXWORD; 44 | case R_390_32: 45 | return ELF_T_SWORD; 46 | case R_390_16: 47 | return ELF_T_HALF; 48 | case R_390_8: 49 | return ELF_T_BYTE; 50 | default: 51 | return ELF_T_NUM; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /backends/sh_init.c: -------------------------------------------------------------------------------- 1 | /* Initialization of SH specific backend library. 2 | Copyright (C) 2000, 2001, 2002, 2005 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2000. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #define BACKEND sh_ 32 | #define RELOC_PREFIX R_SH_ 33 | #include "libebl_CPU.h" 34 | 35 | /* This defines the common reloc hooks based on sh_reloc.def. */ 36 | #include "common-reloc.c" 37 | 38 | 39 | const char * 40 | sh_init (elf, machine, eh, ehlen) 41 | Elf *elf __attribute__ ((unused)); 42 | GElf_Half machine __attribute__ ((unused)); 43 | Ebl *eh; 44 | size_t ehlen; 45 | { 46 | /* Check whether the Elf_BH object has a sufficent size. */ 47 | if (ehlen < sizeof (Ebl)) 48 | return NULL; 49 | 50 | /* We handle it. */ 51 | eh->name = "Hitachi SH"; 52 | sh_init_reloc (eh); 53 | HOOK (eh, reloc_simple_type); 54 | HOOK (eh, gotpc_reloc_check); 55 | HOOK (eh, machine_flag_check); 56 | HOOK (eh, core_note); 57 | HOOK (eh, register_info); 58 | HOOK (eh, return_value_location); 59 | 60 | return MODVERSION; 61 | } 62 | -------------------------------------------------------------------------------- /backends/sparc64_corenote.c: -------------------------------------------------------------------------------- 1 | #define BITS 64 2 | #include "sparc_corenote.c" 3 | -------------------------------------------------------------------------------- /backends/sparc_auxv.c: -------------------------------------------------------------------------------- 1 | /* SPARC-specific auxv handling. 2 | Copyright (C) 2007 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND sparc_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | EBLHOOK(auxv_info) (GElf_Xword a_type, const char **name, const char **format) 35 | { 36 | if (a_type != AT_HWCAP) 37 | return 0; 38 | 39 | *name = "HWCAP"; 40 | *format = "b" 41 | "flush\0" "stbar\0" "swap\0" "muldiv\0" "v9\0" "ultra3\0" "v9v\0" "\0"; 42 | return 1; 43 | } 44 | -------------------------------------------------------------------------------- /backends/x86_64_symbol.c: -------------------------------------------------------------------------------- 1 | /* x86_64 specific symbolic name handling. 2 | Copyright (C) 2002, 2005 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | #define BACKEND x86_64_ 36 | #include "libebl_CPU.h" 37 | 38 | /* Check for the simple reloc types. */ 39 | Elf_Type 40 | x86_64_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) 41 | { 42 | switch (type) 43 | { 44 | case R_X86_64_64: 45 | return ELF_T_XWORD; 46 | case R_X86_64_32: 47 | return ELF_T_WORD; 48 | case R_X86_64_32S: 49 | return ELF_T_SWORD; 50 | case R_X86_64_16: 51 | return ELF_T_HALF; 52 | case R_X86_64_8: 53 | return ELF_T_BYTE; 54 | default: 55 | return ELF_T_NUM; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /backends/x86_64_syscall.c: -------------------------------------------------------------------------------- 1 | /* Linux/x86-64 system call ABI in DWARF register numbers. 2 | Copyright (C) 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #define BACKEND x86_64_ 31 | #include "libebl_CPU.h" 32 | 33 | int 34 | x86_64_syscall_abi (Ebl *ebl __attribute__ ((unused)), 35 | int *sp, int *pc, int *callno, int args[6]) 36 | { 37 | *sp = 7; /* %rsp */ 38 | *pc = 16; /* %rip */ 39 | *callno = 0; /* %rax */ 40 | args[0] = 5; /* %rdi */ 41 | args[1] = 4; /* %rsi */ 42 | args[2] = 1; /* %rdx */ 43 | args[3] = 10; /* %r10 */ 44 | args[4] = 8; /* %r8 */ 45 | args[5] = 9; /* %r9 */ 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /backends/x86_corenote.c: -------------------------------------------------------------------------------- 1 | /* x86-specific core note handling, pieces common to x86-64 and i386. 2 | Copyright (C) 2005-2010 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #define EXTRA_NOTES_IOPERM \ 27 | case NT_386_IOPERM: \ 28 | return ioperm_info (nhdr->n_descsz, \ 29 | regs_offset, nregloc, reglocs, nitems, items); 30 | 31 | static int 32 | ioperm_info (GElf_Word descsz, GElf_Word *regs_offset, 33 | size_t *nregloc, const Ebl_Register_Location **reglocs, 34 | size_t *nitems, const Ebl_Core_Item **items) 35 | { 36 | static const Ebl_Core_Item ioperm_item = 37 | { .type = ELF_T_WORD, .format = 'b', .name = "ioperm" }; 38 | 39 | if (descsz % 4 != 0) 40 | return 0; 41 | 42 | *regs_offset = 0; 43 | *nregloc = 0; 44 | *reglocs = NULL; 45 | *nitems = 1; 46 | *items = &ioperm_item; 47 | return 1; 48 | } 49 | -------------------------------------------------------------------------------- /config/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /config/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in -*-Makefile-*- 2 | ## Configure input file for elfutils. 3 | ## 4 | ## Copyright (C) 2004, 2005, 2008, 2009, 2011 Red Hat, Inc. 5 | ## This file is part of Red Hat elfutils. 6 | ## 7 | ## Red Hat elfutils is free software; you can redistribute it and/or modify 8 | ## it under the terms of the GNU General Public License as published by the 9 | ## Free Software Foundation; version 2 of the License. 10 | ## 11 | ## Red Hat elfutils is distributed in the hope that it will be useful, but 12 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU General Public License along 17 | ## with Red Hat elfutils; if not, write to the Free Software Foundation, 18 | ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 19 | ## 20 | ## Red Hat elfutils is an included package of the Open Invention Network. 21 | ## An included package of the Open Invention Network is a package for which 22 | ## Open Invention Network licensees cross-license their patents. No patent 23 | ## license is granted, either expressly or impliedly, by designation as an 24 | ## included package. Should you wish to participate in the Open Invention 25 | ## Network licensing program, please visit www.openinventionnetwork.com 26 | ## . 27 | ## 28 | EXTRA_DIST = elfutils.spec.in known-dwarf.awk 29 | 30 | if MAINTAINER_MODE 31 | $(srcdir)/elfutils.spec.in: $(top_srcdir)/NEWS 32 | @tmpname=$$(mktemp $${TMPDIR:-/tmp}/elfutils.XXXXXX); \ 33 | date +'* %a %b %e %Y' | tr '[\n]' '[ ]' > $$tmpname; \ 34 | getent passwd "$$(whoami)" | \ 35 | awk 'BEGIN {FS=":"} { printf $$5; exit 0}' >> $$tmpname; \ 36 | echo -n " <$$(whoami)@gmail.com> " >> $$tmpname; \ 37 | awk '\ 38 | $$1 == "Version" && started { exit } \ 39 | $$1 == "Version" { started=1; line=""; sub(/:/,"",$$2); \ 40 | print $$2 "-1"; next } \ 41 | NF > 0 { line = (line != "") ? (line " " $$0) : ("- " $$0) } \ 42 | NF == 0 && line != "" { print line; line="" } \ 43 | END { if (line != "") print line; print "" }' $< \ 44 | | fold -s -w 70 | sed '1!s/^[^-]/ &/' >> $$tmpname; \ 45 | sed "/^%changelog/r $$tmpname" $@ > $@.new; \ 46 | rm -f $$tmpname; \ 47 | mv -f $@.new $@ 48 | endif 49 | -------------------------------------------------------------------------------- /config/known-dwarf.awk: -------------------------------------------------------------------------------- 1 | #!/bin/awk -f 2 | 3 | $1 == "enum" { set = ""; next } 4 | 5 | set == "" && $1 ~ /DW_([A-Z_]+)_([^ ]+)/ { 6 | set = $1; 7 | sub(/^DW_/, "", set); 8 | sub(/_[^[:upper:]_].*$/, "", set); 9 | if (set ~ /LANG_.+/) set = "LANG"; 10 | } 11 | 12 | $1 ~ /DW([_A-Z]+)_([^ ]+)/ { 13 | match($1, ("DW_" set "_([^ ]+)"), fields); 14 | elt = fields[1]; 15 | if (set in DW) 16 | DW[set] = DW[set] "," elt; 17 | else 18 | DW[set] = elt; 19 | if ($NF == "*/" && $4 == "/*") { 20 | c = $5; 21 | for (i = 6; i < NF; ++i) c = c " " $i; 22 | comment[set, elt] = c; 23 | } 24 | } 25 | 26 | END { 27 | print "/* Generated by config/dwarf-known.awk from libdw.h contents. */"; 28 | n = asorti(DW, sets); 29 | for (i = 1; i <= n; ++i) { 30 | set = sets[i]; 31 | if (what && what != set) continue; 32 | split(DW[set], elts, ","); 33 | m = asort(elts); 34 | lo = hi = ""; 35 | if (m == 0) continue; 36 | print "\n#define ALL_KNOWN_DW_" set " \\"; 37 | for (j = 1; j <= m; ++j) { 38 | elt = elts[j]; 39 | if (elt ~ /(lo|low)_user$/) { 40 | lo = elt; 41 | continue; 42 | } 43 | if (elt ~ /(hi|high)_user$/) { 44 | hi = elt; 45 | continue; 46 | } 47 | if (comment[set, elt]) 48 | print " ONE_KNOWN_DW_" set "_DESC (" elt ", DW_" set "_" elt \ 49 | ", \"" comment[set, elt] "\") \\"; 50 | else 51 | print " ONE_KNOWN_DW_" set " (" elt ", DW_" set "_" elt ") \\"; 52 | } 53 | print " /* End of DW_" set "_*. */"; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /doc/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /doc/ChangeLog: -------------------------------------------------------------------------------- 1 | 2005-04-29 Ulrich Drepper 2 | 3 | * elfutils.sgml: Some typo fixes and a few extensions. 4 | Patch by Eric Christopher . 5 | 6 | 2005-02-22 Ulrich Drepper 7 | 8 | * Makefile.am: Prefer pdf. 9 | 10 | 2003-08-11 Ulrich Drepper 11 | 12 | * Moved to CVS archive. 13 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to create Makefile.in 2 | ## Configure input file for elfutils. 3 | ## 4 | ## Copyright (C) 1996-2001, 2002, 2005 Red Hat, Inc. 5 | ## This file is part of Red Hat elfutils. 6 | ## 7 | ## Red Hat elfutils is free software; you can redistribute it and/or modify 8 | ## it under the terms of the GNU General Public License as published by the 9 | ## Free Software Foundation; version 2 of the License. 10 | ## 11 | ## Red Hat elfutils is distributed in the hope that it will be useful, but 12 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU General Public License along 17 | ## with Red Hat elfutils; if not, write to the Free Software Foundation, 18 | ## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 19 | ## 20 | ## Red Hat elfutils is an included package of the Open Invention Network. 21 | ## An included package of the Open Invention Network is a package for which 22 | ## Open Invention Network licensees cross-license their patents. No patent 23 | ## license is granted, either expressly or impliedly, by designation as an 24 | ## included package. Should you wish to participate in the Open Invention 25 | ## Network licensing program, please visit www.openinventionnetwork.com 26 | ## . 27 | ## 28 | EXTRA_DIST = elfutils.sgml 29 | 30 | CLEANFILES = elfutils.dvi 31 | 32 | # We need only a few special rules to generate the various output formats 33 | # from the SGML sources. 34 | .PHONY: dvi pdf html 35 | pdf: $(srcdir)elfutils.pdf 36 | dvi: $(srcdir)elfutils.dvi 37 | 38 | $(srcdir)%.dvi: %.sgml 39 | db2dvi $^ 40 | $(srcdir)%.pdf: %.sgml 41 | db2pdf $^ 42 | -------------------------------------------------------------------------------- /lib/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /lib/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to create Makefile.in 2 | ## 3 | ## Copyright (C) 1996-2010 Red Hat, Inc. 4 | ## This file is part of Red Hat elfutils. 5 | ## 6 | ## Red Hat elfutils is free software; you can redistribute it and/or modify 7 | ## it under the terms of the GNU General Public License as published by the 8 | ## Free Software Foundation; version 2 of the License. 9 | ## 10 | ## Red Hat elfutils is distributed in the hope that it will be useful, but 11 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ## General Public License for more details. 14 | ## 15 | ## You should have received a copy of the GNU General Public License along 16 | ## with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | ## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | ## 19 | ## Red Hat elfutils is an included package of the Open Invention Network. 20 | ## An included package of the Open Invention Network is a package for which 21 | ## Open Invention Network licensees cross-license their patents. No patent 22 | ## license is granted, either expressly or impliedly, by designation as an 23 | ## included package. Should you wish to participate in the Open Invention 24 | ## Network licensing program, please visit www.openinventionnetwork.com 25 | ## . 26 | ## 27 | include $(top_srcdir)/config/eu.am 28 | AM_CFLAGS += -fpic 29 | INCLUDES += -I$(srcdir)/../libelf 30 | 31 | noinst_LIBRARIES = libeu.a 32 | 33 | libeu_a_SOURCES = xstrndup.c xmalloc.c next_prime.c \ 34 | crc32.c crc32_file.c md5.c sha1.c 35 | 36 | noinst_HEADERS = fixedsizehash.h system.h dynamicsizehash.h list.h md5.h \ 37 | sha1.h eu-config.h 38 | EXTRA_DIST = dynamicsizehash.c 39 | 40 | if !GPROF 41 | xmalloc_CFLAGS = -ffunction-sections 42 | endif 43 | -------------------------------------------------------------------------------- /lib/xstrdup.c: -------------------------------------------------------------------------------- 1 | /* Convenience function for string allocation. 2 | Copyright (C) 2006 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #include 31 | #include "system.h" 32 | 33 | 34 | /* Return a newly allocated copy of STRING. */ 35 | char * 36 | xstrdup (string) 37 | const char *string; 38 | { 39 | return strcpy (xmalloc (strlen (string) + 1), string); 40 | } 41 | -------------------------------------------------------------------------------- /lib/xstrndup.c: -------------------------------------------------------------------------------- 1 | /* Convenience function for string allocation. 2 | Copyright (C) 2006 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #include 31 | #include "system.h" 32 | 33 | 34 | /* Return a newly allocated copy of STRING. */ 35 | char * 36 | xstrndup (string, n) 37 | const char *string; 38 | size_t n; 39 | { 40 | char *res; 41 | size_t len = strnlen (string, n); 42 | *((char *) mempcpy ((res = xmalloc (len + 1)), string, len)) = '\0'; 43 | return res; 44 | } 45 | -------------------------------------------------------------------------------- /libasm/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /libasm/asm_abort.c: -------------------------------------------------------------------------------- 1 | /* Abort operations on the assembler context, free all resources. 2 | Copyright (C) 2002, 2005 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | #include 33 | 34 | #include 35 | #include 36 | 37 | 38 | int 39 | asm_abort (ctx) 40 | AsmCtx_t *ctx; 41 | { 42 | if (ctx == NULL) 43 | /* Something went wrong earlier. */ 44 | return -1; 45 | 46 | if (likely (! ctx->textp)) 47 | /* First free the ELF file. We don't care about the result. */ 48 | (void) elf_end (ctx->out.elf); 49 | 50 | /* Now close the temporary file and remove it. */ 51 | if (ctx->fd != -1) 52 | (void) unlink (ctx->tmp_fname); 53 | 54 | /* Free the resources. */ 55 | __libasm_finictx (ctx); 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /libasm/asm_addint16.c: -------------------------------------------------------------------------------- 1 | /* Add integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define SIZE 16 28 | 29 | #include "asm_addint8.c" 30 | -------------------------------------------------------------------------------- /libasm/asm_addint32.c: -------------------------------------------------------------------------------- 1 | /* Add integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define SIZE 32 28 | 29 | #include "asm_addint8.c" 30 | -------------------------------------------------------------------------------- /libasm/asm_addint64.c: -------------------------------------------------------------------------------- 1 | /* Add integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define SIZE 64 28 | 29 | #include "asm_addint8.c" 30 | -------------------------------------------------------------------------------- /libasm/asm_adduint16.c: -------------------------------------------------------------------------------- 1 | /* Add unsigned integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define SIZE 16 28 | 29 | #include "asm_adduint8.c" 30 | -------------------------------------------------------------------------------- /libasm/asm_adduint32.c: -------------------------------------------------------------------------------- 1 | /* Add unsigned integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define SIZE 32 28 | 29 | #include "asm_adduint8.c" 30 | -------------------------------------------------------------------------------- /libasm/asm_adduint64.c: -------------------------------------------------------------------------------- 1 | /* Add unsigned integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define SIZE 64 28 | 29 | #include "asm_adduint8.c" 30 | -------------------------------------------------------------------------------- /libasm/asm_adduint8.c: -------------------------------------------------------------------------------- 1 | /* Add unsigned integer to a section. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #ifndef SIZE 34 | # define SIZE 8 35 | #endif 36 | 37 | #define UFCT(size) _UFCT(size) 38 | #define _UFCT(size) asm_adduint##size 39 | #define FCT(size) _FCT(size) 40 | #define _FCT(size) asm_addint##size 41 | #define UTYPE(size) _UTYPE(size) 42 | #define _UTYPE(size) uint##size##_t 43 | #define TYPE(size) _TYPE(size) 44 | #define _TYPE(size) int##size##_t 45 | 46 | 47 | int 48 | UFCT(SIZE) (asmscn, num) 49 | AsmScn_t *asmscn; 50 | UTYPE(SIZE) num; 51 | { 52 | return INTUSE(FCT(SIZE)) (asmscn, (TYPE(SIZE)) num); 53 | } 54 | -------------------------------------------------------------------------------- /libasm/asm_getelf.c: -------------------------------------------------------------------------------- 1 | /* Return ELF descriptor associated with the assembler context. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #include 34 | 35 | 36 | Elf * 37 | asm_getelf (ctx) 38 | AsmCtx_t *ctx; 39 | { 40 | return ctx != NULL ? ctx->out.elf : NULL; 41 | } 42 | -------------------------------------------------------------------------------- /libasm/asm_scngrp_newsignature.c: -------------------------------------------------------------------------------- 1 | /* Update signature of section group. 2 | Copyright (C) 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2002. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include "libasmP.h" 32 | 33 | 34 | int 35 | asm_scngrp_newsignature (grp, signature) 36 | AsmScnGrp_t *grp; 37 | AsmSym_t *signature; 38 | { 39 | if (grp == NULL || signature == NULL) 40 | return 1; 41 | 42 | grp->signature = signature; 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /libasm/disasm_begin.c: -------------------------------------------------------------------------------- 1 | /* Create context descriptor for disassembler. 2 | Copyright (C) 2005, 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2005. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #include "libasmP.h" 34 | #include "../libebl/libeblP.h" 35 | 36 | 37 | DisasmCtx_t * 38 | disasm_begin (Ebl *ebl, Elf *elf, DisasmGetSymCB_t symcb) 39 | { 40 | if (ebl == NULL) 41 | return NULL; 42 | 43 | if (ebl->disasm == NULL) 44 | { 45 | __libasm_seterrno (ASM_E_ENOSUP); 46 | return NULL; 47 | } 48 | 49 | DisasmCtx_t *ctx = (DisasmCtx_t *) malloc (sizeof (DisasmCtx_t)); 50 | if (ctx == NULL) 51 | { 52 | __libasm_seterrno (ASM_E_NOMEM); 53 | return NULL; 54 | } 55 | 56 | ctx->ebl = ebl; 57 | ctx->elf = elf; 58 | ctx->symcb = symcb; 59 | 60 | return ctx; 61 | } 62 | -------------------------------------------------------------------------------- /libasm/disasm_end.c: -------------------------------------------------------------------------------- 1 | /* Release descriptor for disassembler. 2 | Copyright (C) 2005, 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2005. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #include "libasmP.h" 34 | 35 | 36 | int 37 | disasm_end (DisasmCtx_t *ctx) 38 | { 39 | free (ctx); 40 | 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /libasm/disasm_str.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005, 2008 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | Written by Ulrich Drepper , 2007. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #include 31 | 32 | #include "libasmP.h" 33 | 34 | 35 | struct buffer 36 | { 37 | char *buf; 38 | size_t len; 39 | }; 40 | 41 | 42 | static int 43 | buffer_cb (char *str, size_t len, void *arg) 44 | { 45 | struct buffer *buffer = (struct buffer *) arg; 46 | 47 | if (len > buffer->len) 48 | /* Return additional needed space. */ 49 | return len - buffer->len; 50 | 51 | buffer->buf = mempcpy (buffer->buf, str, len); 52 | buffer->len = len; 53 | 54 | return 0; 55 | } 56 | 57 | 58 | int 59 | disasm_str (DisasmCtx_t *ctx, const uint8_t **startp, const uint8_t *end, 60 | GElf_Addr addr, const char *fmt, char **bufp, size_t len, 61 | void *symcbarg) 62 | { 63 | struct buffer buffer = { .buf = *bufp, .len = len }; 64 | 65 | int res = INTUSE(disasm_cb) (ctx, startp, end, addr, fmt, buffer_cb, &buffer, 66 | symcbarg); 67 | *bufp = buffer.buf; 68 | return res; 69 | } 70 | -------------------------------------------------------------------------------- /libasm/libasm.map: -------------------------------------------------------------------------------- 1 | ELFUTILS_1.0 { 2 | global: 3 | asm_abort; 4 | asm_addint16; 5 | asm_addint32; 6 | asm_addint64; 7 | asm_addint8; 8 | asm_addsleb128; 9 | asm_addstrz; 10 | asm_adduint16; 11 | asm_adduint32; 12 | asm_adduint64; 13 | asm_adduint8; 14 | asm_adduleb128; 15 | asm_align; 16 | asm_begin; 17 | asm_end; 18 | asm_errmsg; 19 | asm_errno; 20 | asm_fill; 21 | asm_getelf; 22 | asm_newabssym; 23 | asm_newcomsym; 24 | asm_newscn; 25 | asm_newscn_ingrp; 26 | asm_newscngrp; 27 | asm_newsubscn; 28 | asm_newsym; 29 | asm_scngrp_newsignature; 30 | 31 | disasm_begin; 32 | disasm_cb; 33 | disasm_end; 34 | disasm_str; 35 | 36 | local: 37 | *; 38 | }; 39 | -------------------------------------------------------------------------------- /libasm/symbolhash.c: -------------------------------------------------------------------------------- 1 | /* Symbol hash table implementation. 2 | Copyright (C) 2001, 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2001. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #include 34 | #include 35 | 36 | /* Definitions for the symbol hash table. */ 37 | #define TYPE AsmSym_t * 38 | #define NAME asm_symbol_tab 39 | #define ITERATE 1 40 | #define REVERSE 1 41 | #define COMPARE(a, b) \ 42 | strcmp (ebl_string ((a)->strent), ebl_string ((b)->strent)) 43 | 44 | #define next_prime __libasm_next_prime 45 | extern size_t next_prime (size_t) attribute_hidden; 46 | 47 | #include "../lib/dynamicsizehash.c" 48 | 49 | #undef next_prime 50 | #define next_prime attribute_hidden __libasm_next_prime 51 | #include "../lib/next_prime.c" 52 | -------------------------------------------------------------------------------- /libasm/symbolhash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2002 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | Written by Ulrich Drepper , 2001. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifndef SYMBOLHASH_H 27 | #define SYMBOLHASH_H 1 28 | 29 | /* Definitions for the symbol hash table. */ 30 | #define TYPE AsmSym_t * 31 | #define NAME asm_symbol_tab 32 | #define ITERATE 1 33 | #define COMPARE(a, b) \ 34 | strcmp (ebl_string ((a)->strent), ebl_string ((b)->strent)) 35 | #include 36 | 37 | #endif /* symbolhash.h */ 38 | -------------------------------------------------------------------------------- /libcpu/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /libcpu/defs/i386.doc: -------------------------------------------------------------------------------- 1 | {imm} only parameter: 2 | - is {s} in opcode: {s} == 0, unsigned (8/)16/32 bit immediate 3 | {s} == 1, signed 8 bit immediate 4 | 5 | {es:di}: segment register normally %es, can be overwritten 6 | edi/di depending on apfx 7 | 8 | {ds:si}: segment register normally %ds, can be overwritten 9 | esi/si depending on apfx 10 | 11 | {ax} al/ax/eax depending of dpfx and w 12 | 13 | {dx} (%edx) or (%dx) depending on apfx 14 | 15 | 16 | {w} 0 = b, 1 = { no dpfx = l, dpfx = w } 17 | 18 | {W} no dpfx = , dpfx = w 19 | {WW} no dpfx = l, dpfx = w 20 | 21 | {R} rep prefix possible 22 | {RE} repe or repne prefix possible 23 | 24 | {ccc} CRx registers 25 | {ddd} DRx registers 26 | 27 | {gg} 00 = b, 01 = w, 10 = d, 11 = 28 | {0g} 00 = b, 01 = w, 10 = , 11 = 29 | {GG} 00 = , 01 = w, 10 = d, 11 = q 30 | {gG} 00 = , 01 = w, 10 = d, 11 = 31 | 32 | {modr/m} normal registers 33 | {MODR/M} MMX registers 34 | {ModR/m} XMM registers 35 | 36 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | Special opcodes (prefixes): 38 | 39 | 40 | 01100111:{apfx} 41 | 01100110:{dpfx} 42 | 43 | 00101110:{cs} 44 | 00111110:{ds} 45 | 00100110:{es} 46 | 01100100:{fs} 47 | 01100101:{gs} 48 | 49 | 50 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 51 | 52 | table format 53 | 54 | 1bit RE flag 55 | 1bit R flag 56 | 16bit mnemonic 57 | 3bit suffix 58 | 59 | 5bit fct 60 | 2bit string 61 | 6bit offset1 62 | 5bit offset2 63 | 64 | 4bit fct 65 | 1bit string 66 | 6bit offset1 67 | 4bit offset2 68 | 69 | 2bit fct 70 | 1bit string 71 | 3bit offset1 72 | 1bit offset2 73 | 74 | 61bit 75 | -------------------------------------------------------------------------------- /libcpu/i386_gendis.c: -------------------------------------------------------------------------------- 1 | /* Generate tables for x86 disassembler. 2 | Copyright (C) 2007, 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2007. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | extern int i386_parse (void); 39 | 40 | 41 | extern FILE *i386_in; 42 | extern int i386_debug; 43 | char *infname; 44 | 45 | FILE *outfile; 46 | 47 | int 48 | main (int argc, char *argv[argc]) 49 | { 50 | outfile = stdout; 51 | 52 | if (argc == 1) 53 | error (EXIT_FAILURE, 0, "usage: %s ", argv[0]); 54 | 55 | //i386_debug = 1; 56 | infname = argv[1]; 57 | if (strcmp (infname, "-") == 0) 58 | i386_in = stdin; 59 | else 60 | { 61 | i386_in = fopen (infname, "r"); 62 | if (i386_in == NULL) 63 | error (EXIT_FAILURE, errno, "cannot open %s", argv[1]); 64 | } 65 | 66 | i386_parse (); 67 | 68 | return error_message_count != 0; 69 | } 70 | -------------------------------------------------------------------------------- /libcpu/x86_64_disasm.c: -------------------------------------------------------------------------------- 1 | /* Disassembler for x86-64. 2 | Copyright (C) 2007, 2008 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2007. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #define i386_disasm x86_64_disasm 28 | #define DISFILE "x86_64_dis.h" 29 | #define MNEFILE "x86_64.mnemonics" 30 | #define X86_64 31 | #include "i386_disasm.c" 32 | -------------------------------------------------------------------------------- /libdw/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /libdwfl/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /libdwfl/bzip2.c: -------------------------------------------------------------------------------- 1 | /* bzlib is almost just like zlib. */ 2 | 3 | #define BZLIB 4 | #include "gzip.c" 5 | -------------------------------------------------------------------------------- /libdwfl/lzma.c: -------------------------------------------------------------------------------- 1 | /* liblzma is pretty close to zlib and bzlib. */ 2 | 3 | #define LZMA 4 | #include "gzip.c" 5 | -------------------------------------------------------------------------------- /libebl/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /libelf/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /m4/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /m4/ChangeLog: -------------------------------------------------------------------------------- 1 | 2010-04-14 Roland McGrath 2 | 3 | * gettext.m4: Upgrade to gettext-0.17. 4 | * iconv.m4: Upgrade to gettext-0.17. 5 | * po.m4: Upgrade to gettext-0.17. 6 | 7 | 2009-08-26 Roland McGrath 8 | 9 | * zip.m4 (eu_ZIPLIB): Don't apply lib/LIB suffix to args. 10 | 11 | 2009-02-01 Roland McGrath 12 | 13 | * zip.m4: Fix --with/--without argument handling. 14 | 15 | 2009-01-08 Roland McGrath 16 | 17 | * zip.am: New file. 18 | * Makefile.am (EXTRA_DIST): Add it. 19 | 20 | 2007-06-05 Ulrich Drepper 21 | 22 | * gettext.m4: Update from gettext 0.16.1. 23 | * iconv.m4: Likewise. 24 | * progtest.m4: Likewise. 25 | * nls.m4: New file. 26 | * po.m4: New file. 27 | 28 | 2005-02-15 Ulrich Drepper 29 | 30 | * Makefile.am (EXTRA_DIST): Remove glibc21.m4, intdiv0.m4, 31 | inttypes.m4, inttypes_h.m4, inttypes-pri.m4, isc-posix.m4, 32 | lib-ld.m4, lib-link.m4, lib-prefix.m4, stdint_h.m4, uintmax_t.m4, 33 | and ulonglong.m4. 34 | * glibc21.m4: Removed. 35 | * inttypes_h.m4: Removed. 36 | * inttypes.m4: Removed. 37 | * inttypes-pri.m4: Removed. 38 | * isc-posix.m4: Removed. 39 | * lib-ld.m4: Removed. 40 | * lib-link.m4: Removed. 41 | * lib-prefix.m4: Removed. 42 | * stdint_h.m4: Removed. 43 | * uintmax_t.m4: Removed. 44 | * ulonglong.m4: Removed. 45 | 46 | 2002-03-22 gettextize 47 | 48 | * codeset.m4: Upgrade to gettext-0.11. 49 | * gettext.m4: Upgrade to gettext-0.11. 50 | * glibc21.m4: Upgrade to gettext-0.11. 51 | * iconv.m4: Upgrade to gettext-0.11. 52 | * isc-posix.m4: New file, from gettext-0.11. 53 | * lcmessage.m4: Upgrade to gettext-0.11. 54 | * lib-ld.m4: Upgrade to gettext-0.11. 55 | * lib-link.m4: Upgrade to gettext-0.11. 56 | * lib-prefix.m4: Upgrade to gettext-0.11. 57 | * progtest.m4: Upgrade to gettext-0.11. 58 | * Makefile.am (EXTRA_DIST): Add the new files. 59 | -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in -*-Makefile-*- 2 | ## 3 | ## Copyright (C) 2000-2009 Red Hat, Inc. 4 | ## This file is part of Red Hat elfutils. 5 | ## 6 | ## Red Hat elfutils is free software; you can redistribute it and/or modify 7 | ## it under the terms of the GNU General Public License as published by the 8 | ## Free Software Foundation; version 2 of the License. 9 | ## 10 | ## Red Hat elfutils is distributed in the hope that it will be useful, but 11 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | ## General Public License for more details. 14 | ## 15 | ## You should have received a copy of the GNU General Public License along 16 | ## with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | ## Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | ## 19 | ## Red Hat elfutils is an included package of the Open Invention Network. 20 | ## An included package of the Open Invention Network is a package for which 21 | ## Open Invention Network licensees cross-license their patents. No patent 22 | ## license is granted, either expressly or impliedly, by designation as an 23 | ## included package. Should you wish to participate in the Open Invention 24 | ## Network licensing program, please visit www.openinventionnetwork.com 25 | ## . 26 | ## 27 | 28 | ##m4-files-begin 29 | EXTRA_DIST = codeset.m4 gettext.m4 iconv.m4 lcmessage.m4 progtest.m4 zip.m4 30 | -------------------------------------------------------------------------------- /m4/codeset.m4: -------------------------------------------------------------------------------- 1 | # codeset.m4 serial AM1 (gettext-0.10.40) 2 | dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | 9 | dnl From Bruno Haible. 10 | 11 | AC_DEFUN([AM_LANGINFO_CODESET], 12 | [ 13 | AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 14 | [AC_TRY_LINK([#include ], 15 | [char* cs = nl_langinfo(CODESET);], 16 | am_cv_langinfo_codeset=yes, 17 | am_cv_langinfo_codeset=no) 18 | ]) 19 | if test $am_cv_langinfo_codeset = yes; then 20 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 21 | [Define if you have and nl_langinfo(CODESET).]) 22 | fi 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/lcmessage.m4: -------------------------------------------------------------------------------- 1 | # lcmessage.m4 serial 2 (gettext-0.10.40) 2 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. 3 | dnl This file is free software, distributed under the terms of the GNU 4 | dnl General Public License. As a special exception to the GNU General 5 | dnl Public License, this file may be distributed as part of a program 6 | dnl that contains a configuration script generated by Autoconf, under 7 | dnl the same distribution terms as the rest of that program. 8 | dnl 9 | dnl This file can can be used in projects which are not available under 10 | dnl the GNU General Public License or the GNU Library General Public 11 | dnl License but which still want to provide support for the GNU gettext 12 | dnl functionality. 13 | dnl Please note that the actual code of the GNU gettext library is covered 14 | dnl by the GNU Library General Public License, and the rest of the GNU 15 | dnl gettext package package is covered by the GNU General Public License. 16 | dnl They are *not* in the public domain. 17 | 18 | dnl Authors: 19 | dnl Ulrich Drepper , 1995. 20 | 21 | # Check whether LC_MESSAGES is available in . 22 | 23 | AC_DEFUN([AM_LC_MESSAGES], 24 | [if test $ac_cv_header_locale_h = yes; then 25 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 26 | [AC_TRY_LINK([#include ], [return LC_MESSAGES], 27 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 28 | if test $am_cv_val_LC_MESSAGES = yes; then 29 | AC_DEFINE(HAVE_LC_MESSAGES, 1, 30 | [Define if your file defines LC_MESSAGES.]) 31 | fi 32 | fi]) 33 | -------------------------------------------------------------------------------- /m4/nls.m4: -------------------------------------------------------------------------------- 1 | # nls.m4 serial 3 (gettext-0.15) 2 | dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | dnl 7 | dnl This file can can be used in projects which are not available under 8 | dnl the GNU General Public License or the GNU Library General Public 9 | dnl License but which still want to provide support for the GNU gettext 10 | dnl functionality. 11 | dnl Please note that the actual code of the GNU gettext library is covered 12 | dnl by the GNU Library General Public License, and the rest of the GNU 13 | dnl gettext package package is covered by the GNU General Public License. 14 | dnl They are *not* in the public domain. 15 | 16 | dnl Authors: 17 | dnl Ulrich Drepper , 1995-2000. 18 | dnl Bruno Haible , 2000-2003. 19 | 20 | AC_PREREQ(2.50) 21 | 22 | AC_DEFUN([AM_NLS], 23 | [ 24 | AC_MSG_CHECKING([whether NLS is requested]) 25 | dnl Default is enabled NLS 26 | AC_ARG_ENABLE(nls, 27 | [ --disable-nls do not use Native Language Support], 28 | USE_NLS=$enableval, USE_NLS=yes) 29 | AC_MSG_RESULT($USE_NLS) 30 | AC_SUBST(USE_NLS) 31 | ]) 32 | -------------------------------------------------------------------------------- /m4/zip.m4: -------------------------------------------------------------------------------- 1 | dnl -*- Autoconf -*- test for either zlib or bzlib. 2 | dnl Defines --with-$1 argument, $2 automake conditional, 3 | dnl and sets AC_DEFINE(USE_$2) and LIBS. 4 | 5 | AC_DEFUN([eu_ZIPLIB], [dnl 6 | AC_ARG_WITH([[$1]], 7 | AC_HELP_STRING([--with-[$1]], [support [$1] compression in libdwfl]),, 8 | [with_[$1]=default]) 9 | if test $with_[$1] != no; then 10 | AC_SEARCH_LIBS([$4], [$3], [with_[$1]=yes], 11 | [test $with_[$1] = default || 12 | AC_MSG_ERROR([missing -l[$3] for --with-[$1]])]) 13 | fi 14 | AM_CONDITIONAL([$2], test $with_[$1] = yes) 15 | if test $with_[$1] = yes; then 16 | AC_DEFINE(USE_[$2]) 17 | fi 18 | AH_TEMPLATE(USE_[$2], [Support $5 decompression via -l$3.])]) 19 | -------------------------------------------------------------------------------- /po/.cvsignore: -------------------------------------------------------------------------------- 1 | elfutils.pot 2 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | 2010-04-21 Ulrich Drepper 2 | 3 | * LINGUAS: Remove fr.po, it.po, nl.po, ru.po, zh_CN. The files 4 | contain no translations at all. 5 | 6 | 2010-04-14 Roland McGrath 7 | 8 | * POTFILES.in: Add libdwfl/libdwflP.h. 9 | 10 | * LINGUAS: New file. 11 | * Makefile.in.in: Upgrade to gettext-0.17. 12 | 13 | 2009-01-23 Ulrich Drepper 14 | 15 | * Makevars (XGETTEXT_OPTIONS): Add --flag option for argp_error. 16 | 17 | * POTFILES.in: Add more files with translatable strings. 18 | 19 | 2007-06-05 Ulrich Drepper 20 | 21 | * Makefile.in.in: Update from gettext 0.16.1. 22 | * Rules-quot: Likewise. 23 | * Makevars: Add more XGGETEXT_OPTIONS. 24 | 25 | * remove-potcdata.sin: New file. 26 | 27 | * POTFILES.in: Also include messages from libelf. 28 | 29 | 2007-04-18 Ulrich Drepper 30 | 31 | * Makefile.in.in: Remove MKINSTALLDIRS. 32 | Define mkinstalldirs to mkdir -p. 33 | 34 | 2006-04-04 Roland McGrath 35 | 36 | * POTFILES.in: Comment out lib/xstrdup.c, not distributed any more. 37 | 38 | 2005-08-27 Ulrich Drepper 39 | 40 | * POTFILES.in: Add src/strings.c. 41 | 42 | 2005-08-15 Ulrich Drepper 43 | 44 | * POTFILES.in: Add src/ranlib.c. 45 | 46 | 2005-08-05 Ulrich Drepper 47 | 48 | * Makefile.in.in (XGETTEXT_OPTIONS): Move adding of --flag options 49 | after magic Makevars line. Also look for ERROR from elflint. 50 | 51 | 2005-07-21 Ulrich Drepper 52 | 53 | * Makefile.in.in: Add src/elfcmp. 54 | 55 | 2005-05-07 Ulrich Drepper 56 | 57 | * Makefile.in.in (XGETTEXT_OPTIONS): Define. 58 | 59 | 2005-02-05 Ulrich Drepper 60 | 61 | * POTFILES.in: Remove unnecessary entries. 62 | 63 | 2004-01-18 Ulrich Drepper 64 | 65 | * POTFILES.in: Add files from libdw, libebl, and libasm. 66 | 67 | 2003-08-11 Ulrich Drepper 68 | 69 | * Moved to CVS archive. 70 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # List of translations, i.e. .po files supplied by translators. 2 | de es ja pl uk 3 | 4 | # These are automagically created, not real translations. 5 | en@quot en@boldquot 6 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --flag=error:3:c-format \ 12 | --flag=ERROR:1:c-format --flag=argp_error:2:c-format 13 | 14 | # This is the copyright holder that gets inserted into the header of the 15 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 16 | # package. (Note that the msgstr strings, extracted from the package's 17 | # sources, belong to the copyright holder of the package.) Translators are 18 | # expected to transfer the copyright for their translations to this person 19 | # or entity, or to disclaim their copyright. The empty string stands for 20 | # the public domain; in this case the translators are expected to disclaim 21 | # their copyright. 22 | COPYRIGHT_HOLDER = Red Hat, Inc. 23 | 24 | # This is the email address or URL to which the translators shall report 25 | # bugs in the untranslated strings: 26 | # - Strings which are not entire sentences, see the maintainer guidelines 27 | # in the GNU gettext documentation, section 'Preparing Strings'. 28 | # - Strings which use unclear terms or require additional context to be 29 | # understood. 30 | # - Strings which make invalid assumptions about notation of date, time or 31 | # money. 32 | # - Pluralisation problems. 33 | # - Incorrect English spelling. 34 | # - Incorrect formatting. 35 | # It can be your email address, or a mailing list address where translators 36 | # can write to without being subscribed, or the URL of a web page through 37 | # which the translators can contact you. 38 | MSGID_BUGS_ADDRESS = http://bugzilla.redhat.com/ 39 | 40 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 41 | # message catalogs shall be used. It is usually empty. 42 | EXTRA_LOCALE_CATEGORIES = 43 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of files which containing translatable strings. 2 | # Copyright (C) 2000-2010 Red Hat, Inc. 3 | 4 | # Files from the compatibility library 5 | lib/xmalloc.c 6 | #lib/xstrdup.c 7 | lib/xstrndup.c 8 | 9 | # Library sources 10 | libasm/asm_error.c 11 | libdw/dwarf_error.c 12 | libdwfl/argp-std.c 13 | libdwfl/libdwflP.h 14 | libebl/eblbackendname.c 15 | libebl/eblcorenotetypename.c 16 | libebl/ebldynamictagname.c 17 | libebl/eblobjecttypename.c 18 | libebl/eblobjnote.c 19 | libebl/eblobjnotetypename.c 20 | libebl/eblosabiname.c 21 | libebl/eblsectionname.c 22 | libebl/eblsectiontypename.c 23 | libebl/eblsegmenttypename.c 24 | libebl/eblsymbolbindingname.c 25 | libebl/eblsymboltypename.c 26 | libelf/elf_error.c 27 | 28 | # Program sources 29 | src/addr2line.c 30 | src/ar.c 31 | src/arlib.c 32 | src/elfcmp.c 33 | src/elflint.c 34 | src/findtextrel.c 35 | src/i386_ld.c 36 | src/ld.c 37 | src/ldgeneric.c 38 | src/ldscript.y 39 | src/nm.c 40 | src/objdump.c 41 | src/ranlib.c 42 | src/readelf.c 43 | src/size.c 44 | src/strings.c 45 | src/strip.c 46 | src/unstrip.c 47 | -------------------------------------------------------------------------------- /po/Rules-quot: -------------------------------------------------------------------------------- 1 | # Special Makefile rules for English message catalogs with quotation marks. 2 | 3 | DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 4 | 5 | .SUFFIXES: .insert-header .po-update-en 6 | 7 | en@quot.po-create: 8 | $(MAKE) en@quot.po-update 9 | en@boldquot.po-create: 10 | $(MAKE) en@boldquot.po-update 11 | 12 | en@quot.po-update: en@quot.po-update-en 13 | en@boldquot.po-update: en@boldquot.po-update-en 14 | 15 | .insert-header.po-update-en: 16 | @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 17 | if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 18 | tmpdir=`pwd`; \ 19 | echo "$$lang:"; \ 20 | ll=`echo $$lang | sed -e 's/@.*//'`; \ 21 | LC_ALL=C; export LC_ALL; \ 22 | cd $(srcdir); \ 23 | if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ 24 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 25 | rm -f $$tmpdir/$$lang.new.po; \ 26 | else \ 27 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 28 | :; \ 29 | else \ 30 | echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 31 | exit 1; \ 32 | fi; \ 33 | fi; \ 34 | else \ 35 | echo "creation of $$lang.po failed!" 1>&2; \ 36 | rm -f $$tmpdir/$$lang.new.po; \ 37 | fi 38 | 39 | en@quot.insert-header: insert-header.sin 40 | sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header 41 | 42 | en@boldquot.insert-header: insert-header.sin 43 | sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header 44 | 45 | mostlyclean: mostlyclean-quot 46 | mostlyclean-quot: 47 | rm -f *.insert-header 48 | -------------------------------------------------------------------------------- /po/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /po/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /po/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /po/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /po/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /src/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /src/arlib2.c: -------------------------------------------------------------------------------- 1 | /* Functions to handle creation of Linux archives. 2 | Copyright (C) 2007 Red Hat, Inc. 3 | Written by Ulrich Drepper , 2007. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include "arlib.h" 37 | 38 | 39 | /* Add long file name FILENAME of length FILENAMELEN to the symbol table 40 | SYMTAB. Return the offset into the long file name table. */ 41 | long int 42 | arlib_add_long_name (const char *filename, size_t filenamelen) 43 | { 44 | size_t size = obstack_object_size (&symtab.longnamesob); 45 | 46 | obstack_grow (&symtab.longnamesob, filename, filenamelen); 47 | obstack_grow (&symtab.longnamesob, "/\n", 2); 48 | 49 | return size - sizeof (struct ar_hdr); 50 | } 51 | -------------------------------------------------------------------------------- /src/debugpred.h: -------------------------------------------------------------------------------- 1 | /* Support to debug branch prediction. 2 | Copyright (C) 2007 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2007. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #include 28 | 29 | #if DEBUGPRED 30 | extern const unsigned long int __start_predict_data; 31 | extern const unsigned long int __stop_predict_data; 32 | extern const unsigned long int __start_predict_line; 33 | extern const char *const __start_predict_file; 34 | 35 | static void 36 | __attribute__ ((destructor)) 37 | predprint (void) 38 | { 39 | const unsigned long int *s = &__start_predict_data; 40 | const unsigned long int *e = &__stop_predict_data; 41 | const unsigned long int *sl = &__start_predict_line; 42 | const char *const *sf = &__start_predict_file; 43 | while (s < e) 44 | { 45 | if (s[0] != 0 || s[1] != 0) 46 | printf ("%s:%lu: wrong=%lu, correct=%lu%s\n", *sf, *sl, s[0], s[1], 47 | s[0] > s[1] ? " <==== WARNING" : ""); 48 | ++sl; 49 | ++sf; 50 | s += 2; 51 | } 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /src/libld_elf_i386.map: -------------------------------------------------------------------------------- 1 | ELFUTILS_1.0 { 2 | global: 3 | elf_i386_ld_init; 4 | 5 | local: 6 | *; 7 | }; 8 | -------------------------------------------------------------------------------- /src/none_ld.c: -------------------------------------------------------------------------------- 1 | /* Nothing here. This is just a testimony of automake inflexibility. */ 2 | -------------------------------------------------------------------------------- /src/sectionhash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2002 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | Written by Ulrich Drepper , 2001. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifndef SECTIONHASH_H 27 | #define SECTIONHASH_H 1 28 | 29 | /* Definitions for the section hash table. */ 30 | #define TYPE struct scnhead * 31 | #define NAME ld_section_tab 32 | #define ITERATE 1 33 | #include 34 | 35 | #endif /* sectionhash.h */ 36 | -------------------------------------------------------------------------------- /src/symbolhash.c: -------------------------------------------------------------------------------- 1 | /* Symbol hash table implementation. 2 | Copyright (C) 2001, 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2001. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #include 34 | 35 | /* Definitions for the symbol hash table. */ 36 | #define TYPE struct symbol * 37 | #define NAME ld_symbol_tab 38 | #define ITERATE 1 39 | #define COMPARE(a, b) strcmp ((a)->name, (b)->name) 40 | 41 | #include "../lib/dynamicsizehash.c" 42 | -------------------------------------------------------------------------------- /src/symbolhash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2002 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | Written by Ulrich Drepper , 2001. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifndef SYMBOLHASH_H 27 | #define SYMBOLHASH_H 1 28 | 29 | /* Definitions for the symbol hash table. */ 30 | #define TYPE struct symbol * 31 | #define NAME ld_symbol_tab 32 | #define ITERATE 1 33 | #define COMPARE(a, b) strcmp ((a)->name, (b)->name) 34 | #include 35 | 36 | #endif /* symbolhash.h */ 37 | -------------------------------------------------------------------------------- /src/versionhash.c: -------------------------------------------------------------------------------- 1 | /* Version symbol hash table implementation. 2 | Copyright (C) 2001, 2002 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | Written by Ulrich Drepper , 2001. 5 | 6 | Red Hat elfutils is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by the 8 | Free Software Foundation; version 2 of the License. 9 | 10 | Red Hat elfutils is distributed in the hope that it will be useful, but 11 | WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | 19 | Red Hat elfutils is an included package of the Open Invention Network. 20 | An included package of the Open Invention Network is a package for which 21 | Open Invention Network licensees cross-license their patents. No patent 22 | license is granted, either expressly or impliedly, by designation as an 23 | included package. Should you wish to participate in the Open Invention 24 | Network licensing program, please visit www.openinventionnetwork.com 25 | . */ 26 | 27 | #ifdef HAVE_CONFIG_H 28 | # include 29 | #endif 30 | 31 | #include 32 | 33 | #include 34 | 35 | /* Definitions for the symbol hash table. */ 36 | #define TYPE struct id_list * 37 | #define NAME ld_version_str_tab 38 | #define COMPARE(a, b) strcmp ((a)->id, (b)->id) 39 | 40 | #include "../lib/dynamicsizehash.c" 41 | -------------------------------------------------------------------------------- /src/versionhash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001, 2002 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | Written by Ulrich Drepper , 2001. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifndef VERSIONHASH_H 27 | #define VERSIONHASH_H 1 28 | 29 | /* Definitions for the symbol hash table. */ 30 | #define TYPE struct id_list * 31 | #define NAME ld_version_str_tab 32 | #include 33 | 34 | #endif /* versionhash.h */ 35 | -------------------------------------------------------------------------------- /tests/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | -------------------------------------------------------------------------------- /tests/arls.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | static int handle (const char *fname); 9 | 10 | 11 | int 12 | main (int argc, char *argv[]) 13 | { 14 | elf_version (EV_CURRENT); 15 | 16 | int result = 0; 17 | if (argc == 1) 18 | result = handle ("a.out"); 19 | else 20 | for (int i = 1; i < argc; ++i) 21 | result |= handle (argv[1]); 22 | 23 | return result; 24 | } 25 | 26 | 27 | static int 28 | handle (const char *fname) 29 | { 30 | int fd = open (fname, O_RDONLY); 31 | if (fd == -1) 32 | { 33 | printf ("cannot open '%s': %m\n", fname); 34 | return 1; 35 | } 36 | 37 | Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL); 38 | if (elf == NULL) 39 | { 40 | printf ("cannot get ELF handling for '%s': %s\n", 41 | fname, elf_errmsg (-1)); 42 | close (fd); 43 | return 1; 44 | } 45 | 46 | if (elf_kind (elf) != ELF_K_AR) 47 | { 48 | printf ("'%s' is no archive\n", fname); 49 | elf_end (elf); 50 | close (fd); 51 | return 1; 52 | } 53 | 54 | printf ("%s:\n", fname); 55 | Elf *subelf = NULL; 56 | Elf_Cmd cmd = ELF_C_READ_MMAP; 57 | while ((subelf = elf_begin (fd, cmd, elf)) != NULL) 58 | { 59 | Elf_Arhdr *arhdr = elf_getarhdr (subelf); 60 | if (arhdr == NULL) 61 | { 62 | printf ("cannot get archive header in '%s': %s\n", 63 | fname, elf_errmsg (-1)); 64 | elf_end (subelf); 65 | elf_end (elf); 66 | close (fd); 67 | return 1; 68 | } 69 | 70 | off_t off = elf_getaroff (subelf); 71 | 72 | printf ("\nOffset %llu\n" 73 | " Name %s\n" 74 | " Date %ld\n" 75 | " UID %d\n" 76 | " GID %d\n" 77 | " Mode %o\n" 78 | " Size %lld\n", 79 | (unsigned long long int) off, 80 | arhdr->ar_name, (long int) arhdr->ar_date, (int) arhdr->ar_uid, 81 | (int) arhdr->ar_gid, 82 | (int) arhdr->ar_mode, (long long int) arhdr->ar_size); 83 | 84 | cmd = elf_next (subelf); 85 | elf_end (subelf); 86 | } 87 | 88 | close (fd); 89 | 90 | return 0; 91 | } 92 | -------------------------------------------------------------------------------- /tests/configure.ac: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script. 2 | dnl Configure input file for elfutils test suite. -*-autoconf-*- 3 | dnl 4 | dnl Copyright (C) 2005 Red Hat, Inc. 5 | dnl 6 | dnl This program is free software; you can redistribute it and/or modify 7 | dnl it under the terms of the GNU General Public License as published by 8 | dnl the Free Software Foundation, version 2. 9 | dnl 10 | dnl This program is distributed in the hope that it will be useful, 11 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | dnl GNU General Public License for more details. 14 | dnl 15 | dnl You should have received a copy of the GNU General Public License 16 | dnl along with this program; if not, write to the Free Software Foundation, 17 | dnl Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 18 | dnl 19 | AC_INIT([Red Hat elfutils tests],[0.117], 20 | [http://bugzilla.redhat.com/bugzilla/], 21 | [elfutils-tests]) 22 | 23 | AC_COPYRIGHT([Copyright (C) 2005 Red Hat, Inc.]) 24 | AC_PREREQ(2.59) dnl Minimum Autoconf version required. 25 | 26 | AM_INIT_AUTOMAKE([foreign 1.7]) 27 | 28 | AC_CONFIG_SRCDIR([allfcts.c]) 29 | AC_CONFIG_FILES([Makefile]) 30 | AC_CONFIG_HEADERS([config.h]) 31 | 32 | AC_PROG_CC 33 | 34 | AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl 35 | old_CFLAGS="$CFLAGS" 36 | CFLAGS="$CFLAGS -std=gnu99" 37 | AC_COMPILE_IFELSE([dnl 38 | int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }], 39 | ac_cv_c99=yes, ac_cv_c99=no) 40 | CFLAGS="$old_CFLAGS"]) 41 | AS_IF([test "x$ac_cv_c99" != xyes], 42 | AC_MSG_ERROR([gcc with C99 support required])) 43 | 44 | AC_CHECK_HEADERS([libelf.h elfutils/libdw.h],, 45 | [AC_MSG_ERROR([elfutils-devel package not installed])]) 46 | 47 | AC_CHECK_LIB([asm], [asm_begin], [have_libasm=yes], [have_libasm=no]) 48 | AM_CONDITIONAL(HAVE_LIBASM, [test $have_libasm = yes]) 49 | 50 | AM_CONDITIONAL(STANDALONE, true) 51 | AM_CONDITIONAL(BUILD_STATIC, false) 52 | AM_CONDITIONAL(TESTS_RPATH, false) 53 | AM_CONDITIONAL(MUDFLAP, false) 54 | AM_CONDITIONAL(GCOV, false) 55 | 56 | dnl Text of the config.h file. 57 | AH_BOTTOM([#define ELFUTILS_HEADER(name) ]) 58 | 59 | AC_OUTPUT 60 | -------------------------------------------------------------------------------- /tests/coverage.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [ "x$1" = "x-v" ]; then 4 | verbose=yes 5 | else 6 | verbose=no 7 | fi 8 | 9 | cd .. 10 | 11 | for d in lib libasm libdw libdwfl libebl libelf backends src; do 12 | tmp=$d-data 13 | cd $d 14 | unused=0 15 | unused_files= 16 | for f in *.gcno; do 17 | base="$(basename $f .gcno)" 18 | fc="$base.c" 19 | gcda="$base.gcda" 20 | if [ -f "$gcda" ]; then 21 | gcov -n -a "$fc" | 22 | gawk "/$d.$fc/ { getline; co=gensub(/.*:(.*)% .*/, \"\\\\1\", \"g\"); co=co+0.0; li=\$4+0; printf \"%-35s %6.2f %5d\n\", \"$d/$fc\", co, li } " >> $tmp 23 | else 24 | unused=$(($unused + 1)) 25 | unused_files="$unused_files $fc" 26 | fi 27 | done 28 | if [ -f $tmp ]; then 29 | gawk "{ copct=\$2; co=(\$3*copct)/100; toco+=(co+0); toli += (\$3+0); } END { printf \"%-12s %6.2f%% covered unused files: %3d\n\", \"$d\", (toco*100)/toli, \"$unused\" }" $tmp 30 | rm -f $tmp 31 | else 32 | printf "%-12s 0.00%% covered unused files: %3d\n" "$d" $unused 33 | fi 34 | if [ $verbose = yes ]; then 35 | for f in $unused_files; do 36 | printf '%-42s%s\n' '' $f 37 | done 38 | fi 39 | cd .. 40 | done 41 | -------------------------------------------------------------------------------- /tests/dwfl-bug-report.c: -------------------------------------------------------------------------------- 1 | /* Test program for dwfl_report_end bug. 2 | Copyright (C) 2007 Red Hat, Inc. 3 | This file is part of Red Hat elfutils. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #include 27 | #include ELFUTILS_HEADER(dwfl) 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | static const Dwfl_Callbacks callbacks = 36 | { 37 | .find_elf = dwfl_linux_proc_find_elf, 38 | .find_debuginfo = dwfl_standard_find_debuginfo, 39 | }; 40 | 41 | int 42 | main (void) 43 | { 44 | Dwfl *dwfl = dwfl_begin (&callbacks); 45 | 46 | for (int i = 0; i < 5; ++i) 47 | { 48 | dwfl_report_begin (dwfl); 49 | dwfl_report_module (dwfl, "module1", 0, 10); 50 | dwfl_report_end (dwfl, NULL, NULL); 51 | } 52 | 53 | dwfl_end (dwfl); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /tests/early-offscn.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2008 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | 4 | Red Hat elfutils is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by the 6 | Free Software Foundation; version 2 of the License. 7 | 8 | Red Hat elfutils is distributed in the hope that it will be useful, but 9 | WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License along 14 | with Red Hat elfutils; if not, write to the Free Software Foundation, 15 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 16 | 17 | Red Hat elfutils is an included package of the Open Invention Network. 18 | An included package of the Open Invention Network is a package for which 19 | Open Invention Network licensees cross-license their patents. No patent 20 | license is granted, either expressly or impliedly, by designation as an 21 | included package. Should you wish to participate in the Open Invention 22 | Network licensing program, please visit www.openinventionnetwork.com 23 | . */ 24 | 25 | #ifdef HAVE_CONFIG_H 26 | # include 27 | #endif 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | int 37 | main (int argc, char *argv[]) 38 | { 39 | if (argc < 2) 40 | error (1, 0, "Usage: %s FILE OFFSET", argv[0]); 41 | 42 | /* Set the ELF version. */ 43 | elf_version (EV_CURRENT); 44 | 45 | /* Open the archive. */ 46 | int fd = open (argv[1], O_RDONLY); 47 | if (fd < 0) 48 | error (1, errno, "cannot open '%s'", argv[1]); 49 | 50 | Elf *elf = elf_begin (fd, ELF_C_READ, NULL); 51 | if (elf == NULL) 52 | error (2, 0, "elf_begin: %s", elf_errmsg (-1)); 53 | 54 | Elf_Scn *scn = gelf_offscn (elf, strtoull (argv[2], NULL, 0)); 55 | if (scn == NULL) 56 | error (3, 0, "gelf_offscn: %s", elf_errmsg (-1)); 57 | 58 | elf_end (elf); 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /tests/hash.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | Written by Ulrich Drepper , 2002. 4 | 5 | Red Hat elfutils is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by the 7 | Free Software Foundation; version 2 of the License. 8 | 9 | Red Hat elfutils is distributed in the hope that it will be useful, but 10 | WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License along 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | 18 | Red Hat elfutils is an included package of the Open Invention Network. 19 | An included package of the Open Invention Network is a package for which 20 | Open Invention Network licensees cross-license their patents. No patent 21 | license is granted, either expressly or impliedly, by designation as an 22 | included package. Should you wish to participate in the Open Invention 23 | Network licensing program, please visit www.openinventionnetwork.com 24 | . */ 25 | 26 | #ifdef HAVE_CONFIG_H 27 | # include 28 | #endif 29 | 30 | #include 31 | #include 32 | 33 | 34 | static int 35 | check (const char *name, unsigned long int expected) 36 | { 37 | unsigned long int actual = elf_hash (name); 38 | 39 | return actual != expected; 40 | } 41 | 42 | 43 | int 44 | main (void) 45 | { 46 | int status; 47 | 48 | /* Check some names. We know what the expected result is. */ 49 | status = check ("_DYNAMIC", 165832675); 50 | status |= check ("_GLOBAL_OFFSET_TABLE_", 102264335); 51 | 52 | return status; 53 | } 54 | -------------------------------------------------------------------------------- /tests/hello_i386.ko.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/hello_i386.ko.bz2 -------------------------------------------------------------------------------- /tests/hello_ppc64.ko.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/hello_ppc64.ko.bz2 -------------------------------------------------------------------------------- /tests/hello_s390.ko.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/hello_s390.ko.bz2 -------------------------------------------------------------------------------- /tests/hello_x86_64.ko.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/hello_x86_64.ko.bz2 -------------------------------------------------------------------------------- /tests/rdwrmmap.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int 9 | main (int argc __attribute__ ((unused)), char *argv[]) 10 | { 11 | int fd = open (argv[1], O_RDWR); 12 | if (fd < 0) 13 | error (2, errno, "open: %s", argv[1]); 14 | 15 | if (elf_version (EV_CURRENT) == EV_NONE) 16 | error (1, 0, "libelf version mismatch"); 17 | 18 | Elf *elf = elf_begin (fd, ELF_C_RDWR_MMAP, NULL); 19 | if (elf == NULL) 20 | error (1, 0, "elf_begin: %s", elf_errmsg (-1)); 21 | 22 | if (elf_update (elf, ELF_C_WRITE) < 0) 23 | error (1, 0, "elf_update: %s", elf_errmsg (-1)); 24 | 25 | elf_end (elf); 26 | close (fd); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /tests/rerequest_tag.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2011 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | 4 | Red Hat elfutils is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by the 6 | Free Software Foundation; version 2 of the License. 7 | 8 | Red Hat elfutils is distributed in the hope that it will be useful, but 9 | WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License along 14 | with Red Hat elfutils; if not, write to the Free Software Foundation, 15 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 16 | 17 | Red Hat elfutils is an included package of the Open Invention Network. 18 | An included package of the Open Invention Network is a package for which 19 | Open Invention Network licensees cross-license their patents. No patent 20 | license is granted, either expressly or impliedly, by designation as an 21 | included package. Should you wish to participate in the Open Invention 22 | Network licensing program, please visit www.openinventionnetwork.com 23 | . */ 24 | 25 | #include 26 | 27 | #include ELFUTILS_HEADER(dw) 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | int 34 | main (int argc, char **argv) 35 | { 36 | assert (argc > 1); 37 | 38 | int i = open (argv[1], O_RDONLY); 39 | assert (i >= 0); 40 | 41 | Dwarf *dw = dwarf_begin (i, DWARF_C_READ); 42 | assert (dw != NULL); 43 | 44 | Dwarf_Die die_mem, *die; 45 | die = dwarf_offdie (dw, 11, &die_mem); 46 | assert (die == &die_mem); 47 | assert (dwarf_tag (die) == 0); 48 | 49 | die = dwarf_offdie (dw, 11, &die_mem); 50 | assert (die == &die_mem); 51 | assert (dwarf_tag (die) == 0); 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /tests/run-addrscopes.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile22 29 | 30 | testrun_compare ./addrscopes -e testfile22 0x8048353 <<\EOF 31 | 0x8048353: 32 | tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837e (tests/foo.c:16) 33 | global [ be] 34 | function (0x2e): 0x8048348 (tests/foo.c:5) .. 0x804835b (tests/foo.c:14) 35 | local [ 8f] 36 | EOF 37 | 38 | test_cleanup 39 | 40 | testfiles testfile24 41 | testrun_compare ./addrscopes -e testfile24 0x804834e <<\EOF 42 | 0x804834e: 43 | inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048364 (/home/roland/build/stock-elfutils/inline-test.c:16) 44 | add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x8048350 (/home/roland/build/stock-elfutils/inline-test.c:9) 45 | y [ 9d] 46 | x [ a2] 47 | x (abstract) 48 | y (abstract) 49 | EOF 50 | 51 | exit 0 52 | -------------------------------------------------------------------------------- /tests/run-allfcts.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | testfiles testfile testfile2 testfile8 30 | 31 | testrun_compare ./allfcts testfile testfile2 testfile8 <<\EOF 32 | /home/drepper/gnu/new-bu/build/ttt/m.c:5:main 33 | /home/drepper/gnu/new-bu/build/ttt/b.c:4:bar 34 | /home/drepper/gnu/new-bu/build/ttt/f.c:3:foo 35 | /shoggoth/drepper/b.c:4:bar 36 | /shoggoth/drepper/f.c:3:foo 37 | /shoggoth/drepper/m.c:5:main 38 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:107:main 39 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:159:print_version 40 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:173:parse_opt 41 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:201:more_help 42 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:217:process_file 43 | /usr/include/sys/stat.h:375:stat64 44 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:291:crc32_file 45 | /home/drepper/gnu/elfutils/build/src/../../src/strip.c:313:handle_elf 46 | EOF 47 | 48 | exit 0 49 | -------------------------------------------------------------------------------- /tests/run-arextract.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 1999, 2000, 2002, 2005, 2006 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 1999. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | tempfiles arextract.test 30 | 31 | archive=../libelf/libelf.a 32 | if test -f $archive; then 33 | # The file is really available (i.e., no shared-only built). 34 | echo -n "Extracting symbols... $ac_c" 35 | 36 | # The files we are looking at. 37 | for f in ../libelf/*.o; do 38 | testrun ./arextract $archive `basename $f` arextract.test || exit 1 39 | cmp $f arextract.test || { 40 | echo "Extraction of $1 failed" 41 | exit 1 42 | } 43 | done 44 | 45 | echo "done" 46 | fi 47 | 48 | exit 0 49 | -------------------------------------------------------------------------------- /tests/run-arsymtest.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 1999, 2000, 2002, 2006 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 1999. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | lib=../libelf/libelf.a 30 | okfile=arsymtest.ok 31 | tmpfile=arsymtest.tmp 32 | testfile=arsymtest.test 33 | 34 | tempfiles $okfile $tmpfile $testfile 35 | 36 | result=77 37 | if test -f $lib; then 38 | # Generate list using `nm' we check against. 39 | nm -s $lib | 40 | sed -e '1,/^Arch/d' -e '/^$/,$d' | 41 | sort > $okfile 42 | 43 | # Now run our program using libelf. 44 | testrun ./arsymtest $lib $tmpfile || exit 1 45 | sort $tmpfile > $testfile 46 | 47 | # Compare the outputs. 48 | if cmp $okfile $testfile; then 49 | result=0 50 | else 51 | result=1 52 | fi 53 | fi 54 | 55 | exit $result 56 | -------------------------------------------------------------------------------- /tests/run-bug1-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2006 Red Hat, Inc. 3 | # Written by Ulrich Drepper , 2006. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile28 testfile28.rdwr 29 | 30 | testrun ./rdwrmmap testfile28 31 | 32 | cmp testfile28 testfile28.rdwr 33 | 34 | test_cleanup 35 | 36 | testfiles testfile29 testfile29.rdwr 37 | 38 | testrun ./rdwrmmap testfile29 39 | 40 | cmp testfile29 testfile29.rdwr 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /tests/run-disasm-x86-64.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007, 2008 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | # Run x86-64 test. 29 | case "`uname -m`" in 30 | x86_64) 31 | tempfiles testfile45.o 32 | testfiles testfile45.S testfile45.expect 33 | gcc -m64 -c -o testfile45.o testfile45.S 34 | testrun_compare ../src/objdump -d testfile45.o < testfile45.expect 35 | ;; 36 | esac 37 | -------------------------------------------------------------------------------- /tests/run-disasm-x86.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007, 2008 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | # Run x86 test. 29 | case "`uname -m`" in 30 | x86_64 | i?86 ) 31 | tempfiles testfile44.o 32 | testfiles testfile44.S testfile44.expect 33 | gcc -m32 -c -o testfile44.o testfile44.S 34 | testrun_compare ../src/objdump -d testfile44.o < testfile44.expect 35 | ;; 36 | esac 37 | -------------------------------------------------------------------------------- /tests/run-dwfl-addr-sect.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007-2009 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile43 testfile50 29 | 30 | testrun_compare ./dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF 31 | address 0x64 => module "" section 4 + 0 32 | address 0x8 => module "" section 1 + 0x8 33 | address 0x98 => module "" section 7 + 0 34 | EOF 35 | 36 | testrun_compare ./dwfl-addr-sect -e testfile50 0x1 <<\EOF 37 | address 0x1 => module "" section 1 + 0x1 38 | EOF 39 | 40 | exit 0 41 | -------------------------------------------------------------------------------- /tests/run-dwfl-bug-offline-rel.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile36 testfile36.debug 29 | 30 | testrun_compare ./dwflmodtest -e testfile36 <<\EOF 31 | module: 00000000..00002308 testfile36 (null) 32 | module: 00000000 DWARF 0 (no error) 33 | module: 00000000..00002308 testfile36 testfile36.debug 34 | EOF 35 | 36 | exit 0 37 | -------------------------------------------------------------------------------- /tests/run-early-offscn.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2008 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile 29 | 30 | testrun ./early-offscn testfile 0x500 31 | 32 | exit 0 33 | -------------------------------------------------------------------------------- /tests/run-ecp-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2002, 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Jakub Jelinek , 2002. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | testfiles testfile10 30 | tempfiles testfile10.tmp 31 | 32 | testrun ./ecp testfile10 testfile10.tmp 33 | 34 | cmp testfile10 testfile10.tmp 35 | 36 | exit 0 37 | -------------------------------------------------------------------------------- /tests/run-ecp-test2.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2002, 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Jakub Jelinek , 2002. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | testfiles testfile2 30 | tempfiles testfile2.tmp 31 | 32 | testrun ./ecp testfile2 testfile2.tmp 33 | 34 | exit 0 35 | -------------------------------------------------------------------------------- /tests/run-elflint-self.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005, 2007 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | status=0 30 | runtest() { 31 | # Uncomment for debuging 32 | # echo $1 33 | if [ -f $1 ]; then 34 | testrun ../src/elflint --quiet --gnu-ld $1 || 35 | { echo "*** failure in $1"; status=1; } 36 | fi 37 | } 38 | 39 | runtest ../src/addr2line 40 | runtest ../src/elfcmp 41 | runtest ../src/elflint 42 | runtest ../src/findtextrel 43 | runtest ../src/ld 44 | runtest ../src/nm 45 | runtest ../src/objdump 46 | runtest ../src/readelf 47 | runtest ../src/size 48 | runtest ../src/strip 49 | runtest ../libelf/libelf.so 50 | runtest ../libdw/libdw.so 51 | runtest ../libasm/libasm.so 52 | runtest ../libebl/libebl_alpha.so 53 | runtest ../libebl/libebl_arm.so 54 | runtest ../libebl/libebl_i386.so 55 | runtest ../libebl/libebl_ia64.so 56 | runtest ../libebl/libebl_ppc.so 57 | runtest ../libebl/libebl_ppc64.so 58 | runtest ../libebl/libebl_sh.so 59 | runtest ../libebl/libebl_sparc.so 60 | runtest ../libebl/libebl_x86_64.so 61 | 62 | exit $status 63 | -------------------------------------------------------------------------------- /tests/run-elflint-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005, 2007, 2008 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | testfiles testfile18 30 | 31 | testrun_compare ../src/elflint --gnu-ld testfile18 <<\EOF 32 | section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC 33 | EOF 34 | 35 | testfiles testfile32 36 | testrun ../src/elflint -q testfile32 37 | 38 | testfiles testfile33 39 | testrun ../src/elflint -q testfile33 40 | 41 | testfiles testfile42 42 | testrun ../src/elflint -q --gnu-ld testfile42 43 | 44 | testfiles testfile46 45 | testrun ../src/elflint -q testfile46 46 | 47 | exit 0 48 | -------------------------------------------------------------------------------- /tests/run-funcscopes.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile25 29 | 30 | testrun_compare ./funcscopes -e testfile25 incr <<\EOF 31 | testfile25: 0x8048000 .. 0x8049528 32 | inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9) 33 | incr (0x2e): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9) 34 | x [ 66] 35 | EOF 36 | 37 | exit 0 38 | -------------------------------------------------------------------------------- /tests/run-get-pubnames.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 1999. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | testfiles testfile testfile2 30 | 31 | testrun_compare ./get-pubnames testfile testfile2 <<\EOF 32 | [ 0] "main", die: 104, cu: 11 33 | CU name: "m.c" 34 | object name: "main" 35 | [ 1] "a", die: 174, cu: 11 36 | CU name: "m.c" 37 | object name: "a" 38 | [ 2] "bar", die: 295, cu: 202 39 | CU name: "b.c" 40 | object name: "bar" 41 | [ 3] "foo", die: 5721, cu: 5628 42 | CU name: "f.c" 43 | object name: "foo" 44 | [ 0] "bar", die: 72, cu: 11 45 | CU name: "b.c" 46 | object name: "bar" 47 | [ 1] "foo", die: 2490, cu: 2429 48 | CU name: "f.c" 49 | object name: "foo" 50 | [ 2] "main", die: 2593, cu: 2532 51 | CU name: "m.c" 52 | object name: "main" 53 | [ 3] "a", die: 2663, cu: 2532 54 | CU name: "m.c" 55 | object name: "a" 56 | EOF 57 | 58 | exit 0 59 | -------------------------------------------------------------------------------- /tests/run-ranlib-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | tempfiles ranlib-test.a ranlib-test.a-copy 30 | 31 | cat > ranlib-test.a <<"EOF" 32 | ! 33 | foo/ 1124128960 500 500 100664 4 ` 34 | foo 35 | bar/ 1124128965 500 500 100664 4 ` 36 | bar 37 | EOF 38 | 39 | cp ranlib-test.a ranlib-test.a-copy 40 | 41 | testrun ../src/ranlib ranlib-test.a 42 | 43 | # The ranlib call should not have changed anything. 44 | cmp ranlib-test.a ranlib-test.a-copy 45 | 46 | exit 0 47 | -------------------------------------------------------------------------------- /tests/run-ranlib-test2.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | . $srcdir/test-subr.sh 28 | 29 | original=${original:-testfile19} 30 | indexed=${indexed:-testfile19.index} 31 | 32 | testfiles $original $indexed 33 | 34 | testrun ../src/ranlib $original 35 | 36 | if test -z "$noindex"; then 37 | # The date in the index is different. The reference file has it blanked 38 | # out, we do the same here. 39 | echo " " | 40 | dd of=$original seek=24 bs=1 count=12 conv=notrunc 2>/dev/null 41 | fi 42 | 43 | cmp $original $indexed 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /tests/run-ranlib-test3.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | 28 | original=testfile20 29 | indexed=testfile20.index 30 | . $srcdir/run-ranlib-test2.sh 31 | -------------------------------------------------------------------------------- /tests/run-ranlib-test4.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 2005. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | 28 | original=testfile21 29 | indexed=testfile21.index 30 | noindex=1 31 | . $srcdir/run-ranlib-test2.sh 32 | -------------------------------------------------------------------------------- /tests/run-readelf-test2.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile28 29 | 30 | testrun_compare ../src/readelf -x .strtab testfile28 <<\EOF 31 | 32 | Hex dump of section [6] '.strtab', 1 bytes at offset 0x290: 33 | 0x00000000 00 . 34 | EOF 35 | 36 | exit 0 37 | -------------------------------------------------------------------------------- /tests/run-readelf-test3.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile40.debug 29 | 30 | testrun_compare ../src/readelf -n testfile40.debug <<\EOF 31 | 32 | Note section [ 6] '.note' of 60 bytes at offset 0x120: 33 | Owner Data size Type 34 | GNU 20 GNU_BUILD_ID 35 | Build ID: 34072edcd87ef6728f4b4a7956167b2fcfc3f1d3 36 | Linux 4 : 0 37 | EOF 38 | 39 | exit 0 40 | -------------------------------------------------------------------------------- /tests/run-readelf-test4.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile19.index 29 | 30 | testrun_compare ../src/readelf -c testfile19.index <<\EOF 31 | 32 | Index of archive 'testfile19.index' has 4 entries: 33 | Archive member 'u1.o' contains: 34 | a 35 | Archive member 'u2.o' contains: 36 | aa 37 | Archive member 'u3.o' contains: 38 | a 39 | EOF 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /tests/run-readelf-twofiles.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2011 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile14 29 | 30 | testrun >/dev/null ../src/readelf -w testfile14 testfile14 31 | 32 | exit 0 33 | -------------------------------------------------------------------------------- /tests/run-rerequest_tag.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2011 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile56 testfile57 29 | 30 | testrun ./rerequest_tag testfile56 31 | testrun ./rerequest_tag testfile57 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /tests/run-strip-groups.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2011 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | # 26 | # g++ -gdwarf-4 -c testfile58.cxx 27 | # class ct 28 | # { 29 | # private: 30 | # int i; 31 | # 32 | # public: 33 | # void foo () 34 | # { 35 | # i = 1; 36 | # } 37 | # 38 | # int bar () 39 | # { 40 | # return i; 41 | # } 42 | # }; 43 | # 44 | # int baz () 45 | # { 46 | # class ct c; 47 | # c.foo (); 48 | # return c.bar (); 49 | # } 50 | 51 | . $srcdir/test-subr.sh 52 | 53 | infile=testfile58 54 | outfile=$infile.stripped 55 | dbgfile=$infile.debug 56 | 57 | testfiles $infile 58 | tempfiles $outfile $dbgfile 59 | 60 | testrun ../src/strip -o $outfile -f $dbgfile $infile 61 | testrun ../src/elflint -q $infile 62 | testrun ../src/elflint -q $outfile 63 | testrun ../src/elflint -q -d $dbgfile 64 | -------------------------------------------------------------------------------- /tests/run-strip-test2.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 1999, 2000, 2002, 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 1999. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | 28 | original=testfile8 29 | stripped=testfile9 30 | . $srcdir/run-strip-test.sh 31 | -------------------------------------------------------------------------------- /tests/run-strip-test3.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # Written by Ulrich Drepper , 1999. 5 | # 6 | # Red Hat elfutils is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by the 8 | # Free Software Foundation; version 2 of the License. 9 | # 10 | # Red Hat elfutils is distributed in the hope that it will be useful, but 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License along 16 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 18 | # 19 | # Red Hat elfutils is an included package of the Open Invention Network. 20 | # An included package of the Open Invention Network is a package for which 21 | # Open Invention Network licensees cross-license their patents. No patent 22 | # license is granted, either expressly or impliedly, by designation as an 23 | # included package. Should you wish to participate in the Open Invention 24 | # Network licensing program, please visit www.openinventionnetwork.com 25 | # . 26 | 27 | 28 | original=testfile12 29 | stripped=testfile13 30 | . $srcdir/run-strip-test.sh 31 | -------------------------------------------------------------------------------- /tests/run-strip-test4.sh: -------------------------------------------------------------------------------- 1 | original=testfile11 2 | stripped=testfile37 3 | debugfile=testfile37.debug 4 | 5 | . $srcdir/run-strip-test.sh 6 | -------------------------------------------------------------------------------- /tests/run-strip-test5.sh: -------------------------------------------------------------------------------- 1 | original=testfile8 2 | stripped=testfile16 3 | debugfile=testfile16.debug 4 | 5 | . $srcdir/run-strip-test.sh 6 | -------------------------------------------------------------------------------- /tests/run-strip-test6.sh: -------------------------------------------------------------------------------- 1 | original=testfile12 2 | stripped=testfile35 3 | debugfile=testfile35.debug 4 | 5 | . $srcdir/run-strip-test.sh 6 | -------------------------------------------------------------------------------- /tests/run-strip-test7.sh: -------------------------------------------------------------------------------- 1 | original=testfile39 2 | stripped=testfile40 3 | debugfile=testfile40.debug 4 | 5 | . $srcdir/run-strip-test.sh 6 | -------------------------------------------------------------------------------- /tests/run-strip-test8.sh: -------------------------------------------------------------------------------- 1 | original=testfile47 2 | stripped=testfile48 3 | debugfile=testfile48.debug 4 | 5 | . $srcdir/run-strip-test.sh 6 | -------------------------------------------------------------------------------- /tests/run-test-flag-nobits.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2010 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | testfiles testfile 29 | 30 | testrun ./test-flag-nobits testfile 31 | -------------------------------------------------------------------------------- /tests/run-unstrip-test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Copyright (C) 2007-2010 Red Hat, Inc. 3 | # This file is part of Red Hat elfutils. 4 | # 5 | # Red Hat elfutils is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by the 7 | # Free Software Foundation; version 2 of the License. 8 | # 9 | # Red Hat elfutils is distributed in the hope that it will be useful, but 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | # General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with Red Hat elfutils; if not, write to the Free Software Foundation, 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17 | # 18 | # Red Hat elfutils is an included package of the Open Invention Network. 19 | # An included package of the Open Invention Network is a package for which 20 | # Open Invention Network licensees cross-license their patents. No patent 21 | # license is granted, either expressly or impliedly, by designation as an 22 | # included package. Should you wish to participate in the Open Invention 23 | # Network licensing program, please visit www.openinventionnetwork.com 24 | # . 25 | 26 | . $srcdir/test-subr.sh 27 | 28 | original=${original:-testfile12} 29 | stripped=${stripped:-testfile17} 30 | debugfile=${debugfile:-${stripped}.debug} 31 | 32 | testfiles $original $stripped $debugfile 33 | tempfiles testfile.unstrip testfile.inplace 34 | 35 | # These are old reference output from run-test-strip6.sh, when 36 | # strip left the .debug file with unchanged sh_size in 37 | # stripped sections that shrank in the stripped file. strip 38 | # no longer does that, but unstrip must still handle it. 39 | 40 | testrun ../src/unstrip -o testfile.unstrip $stripped $debugfile 41 | 42 | testrun ../src/elfcmp --hash-inexact $original testfile.unstrip 43 | 44 | # Also test modifying the file in place. 45 | 46 | rm -f testfile.inplace 47 | cp $debugfile testfile.inplace 48 | chmod 644 testfile.inplace 49 | testrun ../src/unstrip $stripped testfile.inplace 50 | 51 | testrun ../src/elfcmp --hash-inexact $original testfile.inplace 52 | -------------------------------------------------------------------------------- /tests/run-unstrip-test2.sh: -------------------------------------------------------------------------------- 1 | original=testfile11 2 | stripped=testfile15 3 | debugfile=testfile15.debug 4 | 5 | . $srcdir/run-unstrip-test.sh 6 | -------------------------------------------------------------------------------- /tests/test-flag-nobits.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2010 Red Hat, Inc. 2 | This file is part of Red Hat elfutils. 3 | 4 | Red Hat elfutils is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by the 6 | Free Software Foundation; version 2 of the License. 7 | 8 | Red Hat elfutils is distributed in the hope that it will be useful, but 9 | WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License along 14 | with Red Hat elfutils; if not, write to the Free Software Foundation, 15 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 16 | 17 | Red Hat elfutils is an included package of the Open Invention Network. 18 | An included package of the Open Invention Network is a package for which 19 | Open Invention Network licensees cross-license their patents. No patent 20 | license is granted, either expressly or impliedly, by designation as an 21 | included package. Should you wish to participate in the Open Invention 22 | Network licensing program, please visit www.openinventionnetwork.com 23 | . */ 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | int 30 | main (int argc, char **argv) 31 | { 32 | if (argc != 2) 33 | abort (); 34 | 35 | elf_version (EV_CURRENT); 36 | 37 | int fd = open64 (argv[1], O_RDONLY); 38 | Elf *stripped = elf_begin (fd, ELF_C_READ, NULL); 39 | 40 | Elf_Scn *scn = NULL; 41 | while ((scn = elf_nextscn (stripped, scn)) != NULL) 42 | elf_flagdata (elf_getdata (scn, NULL), ELF_C_SET, ELF_F_DIRTY); 43 | } 44 | -------------------------------------------------------------------------------- /tests/testfile.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile.bz2 -------------------------------------------------------------------------------- /tests/testfile10.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile10.bz2 -------------------------------------------------------------------------------- /tests/testfile11.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile11.bz2 -------------------------------------------------------------------------------- /tests/testfile12.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile12.bz2 -------------------------------------------------------------------------------- /tests/testfile13.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile13.bz2 -------------------------------------------------------------------------------- /tests/testfile14.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile14.bz2 -------------------------------------------------------------------------------- /tests/testfile15.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile15.bz2 -------------------------------------------------------------------------------- /tests/testfile15.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile15.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile16.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile16.bz2 -------------------------------------------------------------------------------- /tests/testfile16.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile16.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile17.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile17.bz2 -------------------------------------------------------------------------------- /tests/testfile17.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile17.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile18.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile18.bz2 -------------------------------------------------------------------------------- /tests/testfile19.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile19.bz2 -------------------------------------------------------------------------------- /tests/testfile19.index.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile19.index.bz2 -------------------------------------------------------------------------------- /tests/testfile2.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile2.bz2 -------------------------------------------------------------------------------- /tests/testfile20.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile20.bz2 -------------------------------------------------------------------------------- /tests/testfile20.index.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile20.index.bz2 -------------------------------------------------------------------------------- /tests/testfile21.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile21.bz2 -------------------------------------------------------------------------------- /tests/testfile21.index.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile21.index.bz2 -------------------------------------------------------------------------------- /tests/testfile22.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile22.bz2 -------------------------------------------------------------------------------- /tests/testfile23.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile23.bz2 -------------------------------------------------------------------------------- /tests/testfile24.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile24.bz2 -------------------------------------------------------------------------------- /tests/testfile25.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile25.bz2 -------------------------------------------------------------------------------- /tests/testfile26.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile26.bz2 -------------------------------------------------------------------------------- /tests/testfile27.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile27.bz2 -------------------------------------------------------------------------------- /tests/testfile28.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile28.bz2 -------------------------------------------------------------------------------- /tests/testfile28.rdwr.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile28.rdwr.bz2 -------------------------------------------------------------------------------- /tests/testfile29.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile29.bz2 -------------------------------------------------------------------------------- /tests/testfile29.rdwr.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile29.rdwr.bz2 -------------------------------------------------------------------------------- /tests/testfile3.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile3.bz2 -------------------------------------------------------------------------------- /tests/testfile30.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile30.bz2 -------------------------------------------------------------------------------- /tests/testfile31.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile31.bz2 -------------------------------------------------------------------------------- /tests/testfile32.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile32.bz2 -------------------------------------------------------------------------------- /tests/testfile33.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile33.bz2 -------------------------------------------------------------------------------- /tests/testfile34.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile34.bz2 -------------------------------------------------------------------------------- /tests/testfile35.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile35.bz2 -------------------------------------------------------------------------------- /tests/testfile35.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile35.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile36.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile36.bz2 -------------------------------------------------------------------------------- /tests/testfile36.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile36.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile37.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile37.bz2 -------------------------------------------------------------------------------- /tests/testfile37.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile37.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile38.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile38.bz2 -------------------------------------------------------------------------------- /tests/testfile39.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile39.bz2 -------------------------------------------------------------------------------- /tests/testfile4.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile4.bz2 -------------------------------------------------------------------------------- /tests/testfile40.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile40.bz2 -------------------------------------------------------------------------------- /tests/testfile40.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile40.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile41.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile41.bz2 -------------------------------------------------------------------------------- /tests/testfile42.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile42.bz2 -------------------------------------------------------------------------------- /tests/testfile43.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile43.bz2 -------------------------------------------------------------------------------- /tests/testfile44.S.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile44.S.bz2 -------------------------------------------------------------------------------- /tests/testfile44.expect.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile44.expect.bz2 -------------------------------------------------------------------------------- /tests/testfile45.S.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile45.S.bz2 -------------------------------------------------------------------------------- /tests/testfile45.expect.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile45.expect.bz2 -------------------------------------------------------------------------------- /tests/testfile46.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile46.bz2 -------------------------------------------------------------------------------- /tests/testfile47.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile47.bz2 -------------------------------------------------------------------------------- /tests/testfile48.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile48.bz2 -------------------------------------------------------------------------------- /tests/testfile48.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile48.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile49.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile49.bz2 -------------------------------------------------------------------------------- /tests/testfile5.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile5.bz2 -------------------------------------------------------------------------------- /tests/testfile50.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile50.bz2 -------------------------------------------------------------------------------- /tests/testfile51.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile51.bz2 -------------------------------------------------------------------------------- /tests/testfile52-32.noshdrs.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-32.noshdrs.so.bz2 -------------------------------------------------------------------------------- /tests/testfile52-32.prelink.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-32.prelink.so.bz2 -------------------------------------------------------------------------------- /tests/testfile52-32.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-32.so.bz2 -------------------------------------------------------------------------------- /tests/testfile52-32.so.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-32.so.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile52-64.noshdrs.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-64.noshdrs.so.bz2 -------------------------------------------------------------------------------- /tests/testfile52-64.prelink.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-64.prelink.so.bz2 -------------------------------------------------------------------------------- /tests/testfile52-64.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-64.so.bz2 -------------------------------------------------------------------------------- /tests/testfile52-64.so.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile52-64.so.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile53-32.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile53-32.bz2 -------------------------------------------------------------------------------- /tests/testfile53-32.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile53-32.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile53-32.prelink.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile53-32.prelink.bz2 -------------------------------------------------------------------------------- /tests/testfile53-64.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile53-64.bz2 -------------------------------------------------------------------------------- /tests/testfile53-64.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile53-64.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile53-64.prelink.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile53-64.prelink.bz2 -------------------------------------------------------------------------------- /tests/testfile54-32.noshdrs.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-32.noshdrs.so.bz2 -------------------------------------------------------------------------------- /tests/testfile54-32.prelink.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-32.prelink.so.bz2 -------------------------------------------------------------------------------- /tests/testfile54-32.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-32.so.bz2 -------------------------------------------------------------------------------- /tests/testfile54-32.so.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-32.so.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile54-64.noshdrs.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-64.noshdrs.so.bz2 -------------------------------------------------------------------------------- /tests/testfile54-64.prelink.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-64.prelink.so.bz2 -------------------------------------------------------------------------------- /tests/testfile54-64.so.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-64.so.bz2 -------------------------------------------------------------------------------- /tests/testfile54-64.so.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile54-64.so.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile55-32.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile55-32.bz2 -------------------------------------------------------------------------------- /tests/testfile55-32.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile55-32.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile55-32.prelink.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile55-32.prelink.bz2 -------------------------------------------------------------------------------- /tests/testfile55-64.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile55-64.bz2 -------------------------------------------------------------------------------- /tests/testfile55-64.debug.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile55-64.debug.bz2 -------------------------------------------------------------------------------- /tests/testfile55-64.prelink.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile55-64.prelink.bz2 -------------------------------------------------------------------------------- /tests/testfile56.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile56.bz2 -------------------------------------------------------------------------------- /tests/testfile57.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile57.bz2 -------------------------------------------------------------------------------- /tests/testfile58.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile58.bz2 -------------------------------------------------------------------------------- /tests/testfile6.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile6.bz2 -------------------------------------------------------------------------------- /tests/testfile7.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile7.bz2 -------------------------------------------------------------------------------- /tests/testfile8.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile8.bz2 -------------------------------------------------------------------------------- /tests/testfile9.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kushaldas/elfutils/0b72b650b173fdf5467b337ff26e97e69daed869/tests/testfile9.bz2 --------------------------------------------------------------------------------