diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-04-07 17:45:14 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-04-09 18:32:12 +0300 |
commit | 6d70a3ae0730a2403cae703b6e3bfd588aa07e06 (patch) | |
tree | 5f3dfe88e3816997de0145e90091eb1cfe4e89eb | |
parent | b3bfa1cb53917dcb6690cd7181a26f247601813c (diff) |
Add qbs project files.
Change-Id: I0dbc7c5a3ab76409b01cd125d44d36f1183608cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
36 files changed, 935 insertions, 0 deletions
diff --git a/3rdparty/elfutils/backends/aarch64/aarch64.qbs b/3rdparty/elfutils/backends/aarch64/aarch64.qbs new file mode 100644 index 0000000..dbf7a4f --- /dev/null +++ b/3rdparty/elfutils/backends/aarch64/aarch64.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "aarch64" + additionalSources: ["cfi.c", "corenote.c", "initreg.c", "regs.c"] +} diff --git a/3rdparty/elfutils/backends/alpha/alpha.qbs b/3rdparty/elfutils/backends/alpha/alpha.qbs new file mode 100644 index 0000000..37e779e --- /dev/null +++ b/3rdparty/elfutils/backends/alpha/alpha.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "alpha" + additionalSources: ["auxv.c", "corenote.c", "regs.c"] +} diff --git a/3rdparty/elfutils/backends/arm/arm.qbs b/3rdparty/elfutils/backends/arm/arm.qbs new file mode 100644 index 0000000..be47045 --- /dev/null +++ b/3rdparty/elfutils/backends/arm/arm.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "arm" + additionalSources: ["attrs.c", "auxv.c", "cfi.c", "corenote.c", "initreg.c", "regs.c"] +} diff --git a/3rdparty/elfutils/backends/backends.qbs b/3rdparty/elfutils/backends/backends.qbs new file mode 100644 index 0000000..e29952c --- /dev/null +++ b/3rdparty/elfutils/backends/backends.qbs @@ -0,0 +1,19 @@ +import qbs + +Project { + name: "backends" + references: [ + "aarch64", + "alpha", + "arm", + "i386", + "ia64", + "ppc", + "ppc64", + "s390", + "sh", + "sparc", + "tilegx", + "x86_64", + ] +} diff --git a/3rdparty/elfutils/backends/i386/i386.qbs b/3rdparty/elfutils/backends/i386/i386.qbs new file mode 100644 index 0000000..3930120 --- /dev/null +++ b/3rdparty/elfutils/backends/i386/i386.qbs @@ -0,0 +1,7 @@ +import qbs + +ElfUtilsBackend { + arch: "i386" + Depends { name: "i386 disasm" } + additionalSources: ["auxv.c", "cfi.c", "corenote.c", "initreg.c", "regs.c", "syscall.c"] +} diff --git a/3rdparty/elfutils/backends/ia64/ia64.qbs b/3rdparty/elfutils/backends/ia64/ia64.qbs new file mode 100644 index 0000000..7c347f0 --- /dev/null +++ b/3rdparty/elfutils/backends/ia64/ia64.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "ia64" + additionalSources: ["regs.c"] +} diff --git a/3rdparty/elfutils/backends/ppc/ppc.qbs b/3rdparty/elfutils/backends/ppc/ppc.qbs new file mode 100644 index 0000000..10db524 --- /dev/null +++ b/3rdparty/elfutils/backends/ppc/ppc.qbs @@ -0,0 +1,8 @@ +import qbs + +ElfUtilsBackend { + arch: "ppc" + additionalSources: [ + "attrs.c", "auxv.c", "cfi.c", "corenote.c", "initreg.c", "regs.c", "syscall.c" + ] +} diff --git a/3rdparty/elfutils/backends/ppc64/ppc64.qbs b/3rdparty/elfutils/backends/ppc64/ppc64.qbs new file mode 100644 index 0000000..3b5f9da --- /dev/null +++ b/3rdparty/elfutils/backends/ppc64/ppc64.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "ppc64" + additionalSources: ["corenote.c", "resolve_sym.c"] +} diff --git a/3rdparty/elfutils/backends/s390/s390.qbs b/3rdparty/elfutils/backends/s390/s390.qbs new file mode 100644 index 0000000..d834d42 --- /dev/null +++ b/3rdparty/elfutils/backends/s390/s390.qbs @@ -0,0 +1,10 @@ +import qbs + +ElfUtilsBackend { + arch: "s390" + additionalSources: ["cfi.c", "corenote.c", "initreg.c", "regs.c", "unwind.c"] + Group { + name: "more sources" + files: ["../s390x_corenote.c"] + } +} diff --git a/3rdparty/elfutils/backends/sh/sh.qbs b/3rdparty/elfutils/backends/sh/sh.qbs new file mode 100644 index 0000000..d473232 --- /dev/null +++ b/3rdparty/elfutils/backends/sh/sh.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "sh" + additionalSources: ["corenote.c", "regs.c"] +} diff --git a/3rdparty/elfutils/backends/sparc/sparc.qbs b/3rdparty/elfutils/backends/sparc/sparc.qbs new file mode 100644 index 0000000..381ad4a --- /dev/null +++ b/3rdparty/elfutils/backends/sparc/sparc.qbs @@ -0,0 +1,10 @@ +import qbs + +ElfUtilsBackend { + arch: "sparc" + additionalSources: ["auxv.c", "corenote.c", "regs.c"] + Group { + name: "more sources" + files: ["../sparc64_corenote.c"] + } +} diff --git a/3rdparty/elfutils/backends/tilegx/tilegx.qbs b/3rdparty/elfutils/backends/tilegx/tilegx.qbs new file mode 100644 index 0000000..9d06f74 --- /dev/null +++ b/3rdparty/elfutils/backends/tilegx/tilegx.qbs @@ -0,0 +1,6 @@ +import qbs + +ElfUtilsBackend { + arch: "tilegx" + additionalSources: ["corenote.c", "regs.c"] +} diff --git a/3rdparty/elfutils/backends/x86_64/x86_64.qbs b/3rdparty/elfutils/backends/x86_64/x86_64.qbs new file mode 100644 index 0000000..2208188 --- /dev/null +++ b/3rdparty/elfutils/backends/x86_64/x86_64.qbs @@ -0,0 +1,14 @@ +import qbs + +ElfUtilsBackend { + arch: "x86_64" + Depends { name: "x86_64 disasm" } + additionalSources: ["cfi.c", "corenote.c", "initreg.c", "regs.c", "syscall.c"] + Group { + name: "more sources" + prefix: "../" + files: [ + "i386_auxv.c", + ] + } +} diff --git a/3rdparty/elfutils/elfutils.qbs b/3rdparty/elfutils/elfutils.qbs new file mode 100644 index 0000000..9e5dc8d --- /dev/null +++ b/3rdparty/elfutils/elfutils.qbs @@ -0,0 +1,32 @@ +import qbs + +Project { + name: "elfutils" + + references: [ + "backends", + "lib", + "libasm", + "libcpu", + "libebl", + "libelf", + "libelf/elf32", + "libelf/elf64", + "libdw", + "libdwelf", + "libdwfl", + ] + + Product { + name: "elfutils text files" + files: [ + "AUTHORS", + "COPYING", + "COPYING-GPLV2", + "COPYING-LGPLV3", + "THANKS", + ] + } + + qbsSearchPaths: ["qbs"] +} diff --git a/3rdparty/elfutils/lib/lib.qbs b/3rdparty/elfutils/lib/lib.qbs new file mode 100644 index 0000000..7b231dc --- /dev/null +++ b/3rdparty/elfutils/lib/lib.qbs @@ -0,0 +1,16 @@ +import qbs + +ElfUtilsStaticLib { + name: "eu" + files: [ + "color.c", + "crc32_file.c", + "crc32.c", + "md5.c", + "next_prime.c", + "sha1.c", + "xmalloc.c", + "xstrdup.c", + "xstrndup.c", + ] +} diff --git a/3rdparty/elfutils/libasm/libasm.qbs b/3rdparty/elfutils/libasm/libasm.qbs new file mode 100644 index 0000000..f1bae5c --- /dev/null +++ b/3rdparty/elfutils/libasm/libasm.qbs @@ -0,0 +1,41 @@ +import qbs + +ElfUtilsStaticLib { + name: "asm" + files: [ + "asm_abort.c", + "asm_addint8.c", + "asm_addint16.c", + "asm_addint32.c", + "asm_addint64.c", + "asm_addsleb128.c", + "asm_addstrz.c", + "asm_adduint8.c", + "asm_adduint16.c", + "asm_adduint32.c", + "asm_adduint64.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_ingrp.c", + "asm_newscn.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", + "libasmP.h", + "symbolhash.c", + "symbolhash.h", + ] +} diff --git a/3rdparty/elfutils/libcpu/i386/libcpu-i386.qbs b/3rdparty/elfutils/libcpu/i386/libcpu-i386.qbs new file mode 100644 index 0000000..51e4d6a --- /dev/null +++ b/3rdparty/elfutils/libcpu/i386/libcpu-i386.qbs @@ -0,0 +1,7 @@ +import qbs +import qbs.FileInfo + +Project { + DisHeader { arch: "i386" } + Disasm { arch: "i386" } +} diff --git a/3rdparty/elfutils/libcpu/i386_gendis/MnemonicsFile.qbs b/3rdparty/elfutils/libcpu/i386_gendis/MnemonicsFile.qbs new file mode 100644 index 0000000..2545d78 --- /dev/null +++ b/3rdparty/elfutils/libcpu/i386_gendis/MnemonicsFile.qbs @@ -0,0 +1,64 @@ +import qbs +import qbs.FileInfo +import qbs.TextFile + +Product { + type: ["mnemonics"] + destinationDirectory: project.gendisOutDir + property string outputFileName + property string headerFile: "linecount.h" + Group { + name: "Makefile" + fileTags: ["makefile"] + files: ["../extras.mk"] + } + Group { + name: "defs file" + fileTags: ["defs"] + files: ["../defs/i386"] + } + + Rule { + inputs: ["makefile", "defs"] + multiplex: true + Artifact { + filePath: FileInfo.joinPaths(product.destinationDirectory, product.outputFileName) + fileTags: product.type + } + Artifact { + filePath: product.headerFile + fileTags: ["hpp"] + } + + prepare: { + var makeArgs = ["-f", inputs["makefile"][0].filePath, + "srcdir=" + product.sourceDirectory + "/..", + outputs["mnemonics"][0].fileName]; + var makeCmd = new Command("make", makeArgs); + makeCmd.description = "Creating " + outputs["mnemonics"][0].fileName; + makeCmd.workingDirectory = product.destinationDirectory; + var headerCmd = new JavaScriptCommand(); + headerCmd.description = "Creating " + outputs["hpp"][0].fileName; + headerCmd.sourceCode = function() { + var iFile = new TextFile(outputs["mnemonics"][0].filePath, TextFile.ReadOnly); + var count = 0; + while (!iFile.atEof()) { + ++count; + iFile.readLine(); + } + iFile.close(); + var oFile = new TextFile(outputs["hpp"][0].filePath, TextFile.WriteOnly); + oFile.writeLine("#define NMNES " + count); + oFile.close(); + } + + return [makeCmd, headerCmd]; + } + } + + Export { + Depends { name: "cpp" } + cpp.cFlags: ["-include", FileInfo.joinPaths(product.buildDirectory, product.headerFile)] + cpp.includePaths: [product.destinationDirectory] + } +} diff --git a/3rdparty/elfutils/libcpu/i386_gendis/i386_gendis.qbs b/3rdparty/elfutils/libcpu/i386_gendis/i386_gendis.qbs new file mode 100644 index 0000000..ecd0bc0 --- /dev/null +++ b/3rdparty/elfutils/libcpu/i386_gendis/i386_gendis.qbs @@ -0,0 +1,51 @@ +import qbs + +Project { + MnemonicsFile { name: "i386 mnemonics"; outputFileName: "i386.mnemonics" } + MnemonicsFile { name: "x86_64 mnemonics"; outputFileName: "x86_64.mnemonics" } + + ElfUtilsProduct { + name: "i386_gendis" + destinationDirectory: project.gendisOutDir + type: ["application"] + Depends { name: "eu" } + Depends { name: "i386 mnemonics" } + cpp.cFlags: base.concat(["-Wno-unused-function"]) + Group { + fileTags: ["yacc"] + files: ["../i386_parse.y"] + } + Group { + fileTags: ["lex"] + files: ["../i386_lex.l"] + } + files: ["../i386_gendis.c"] + + Rule { + inputs: ["lex"] + Artifact { + filePath: "i386_lex.c" + fileTags: ["c"] + } + prepare: { + var cmd = new Command("flex", ["-Pi386_", "-o", output.filePath, input.filePath]); + cmd.description = "Creating " + output.fileName; + return [cmd]; + } + } + + Rule { + inputs: ["yacc"] + Artifact { + filePath: "i386_parse.c" + fileTags: ["c"] + } + prepare: { + var cmd = new Command("bison", ["-pi386_", "-d", "-o", output.filePath, + input.filePath]); + cmd.description = "Creating " + output.fileName; + return [cmd]; + } + } + } +} diff --git a/3rdparty/elfutils/libcpu/libcpu.qbs b/3rdparty/elfutils/libcpu/libcpu.qbs new file mode 100644 index 0000000..d71646b --- /dev/null +++ b/3rdparty/elfutils/libcpu/libcpu.qbs @@ -0,0 +1,12 @@ +import qbs +import qbs.FileInfo + +Project { + name: "libcpu" + property string gendisOutDir: FileInfo.joinPaths(project.buildDirectory, "gendis-stuff") + references: [ + "i386_gendis/i386_gendis.qbs", + "i386", + "x86_64", + ] +} diff --git a/3rdparty/elfutils/libcpu/x86_64/libcpu-x86_64.qbs b/3rdparty/elfutils/libcpu/x86_64/libcpu-x86_64.qbs new file mode 100644 index 0000000..e30316a --- /dev/null +++ b/3rdparty/elfutils/libcpu/x86_64/libcpu-x86_64.qbs @@ -0,0 +1,7 @@ +import qbs +import qbs.FileInfo + +Project { + DisHeader { arch: "x86_64" } + Disasm { arch: "x86_64" } +} diff --git a/3rdparty/elfutils/libdw/libdw.qbs b/3rdparty/elfutils/libdw/libdw.qbs new file mode 100644 index 0000000..2d16ba5 --- /dev/null +++ b/3rdparty/elfutils/libdw/libdw.qbs @@ -0,0 +1,134 @@ +import qbs + +ElfUtilsStaticLib { + name: "dw" + files: [ + "cfi.c", + "cfi.h", + "cie.c", + "dwarf_abbrev_hash.h", + "dwarf_sig8_hash.h", + "dwarf.h", + "dwarf_abbrev_hash.c", + "dwarf_abbrevhaschildren.c", + "dwarf_addrdie.c", + "dwarf_aggregate_size.c", + "dwarf_arrayorder.c", + "dwarf_attr_integrate.c", + "dwarf_attr.c", + "dwarf_begin_elf.c", + "dwarf_begin.c", + "dwarf_bitoffset.c", + "dwarf_bitsize.c", + "dwarf_bytesize.c", + "dwarf_cfi_addrframe.c", + "dwarf_cfi_end.c", + "dwarf_child.c", + "dwarf_cu_die.c", + "dwarf_cu_getdwarf.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_die.c", + "dwarf_formref.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_getalt.c", + "dwarf_getarange_addr.c", + "dwarf_getarangeinfo.c", + "dwarf_getaranges.c", + "dwarf_getattrcnt.c", + "dwarf_getattrs.c", + "dwarf_getcfi_elf.c", + "dwarf_getcfi.c", + "dwarf_getelf.c", + "dwarf_getfuncs.c", + "dwarf_getlocation_attr.c", + "dwarf_getlocation_die.c", + "dwarf_getlocation_implicit_pointer.c", + "dwarf_getlocation.c", + "dwarf_getmacros.c", + "dwarf_getpubnames.c", + "dwarf_getscopes_die.c", + "dwarf_getscopes.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_integrate.c", + "dwarf_hasattr.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_getparamcnt.c", + "dwarf_macro_getsrcfiles.c", + "dwarf_macro_opcode.c", + "dwarf_macro_param.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_peel_type.c", + "dwarf_ranges.c", + "dwarf_setalt.c", + "dwarf_siblingof.c", + "dwarf_sig8_hash.c", + "dwarf_srclang.c", + "dwarf_tag.c", + "dwarf_whatattr.c", + "dwarf_whatform.c", + "encoded-value.h", + "fde.c", + "frame-cache.c", + "libdw_alloc.c", + "libdw_findcu.c", + "libdw_form.c", + "libdw_visit_scopes.c", + "known-dwarf.h", + "libdw.h", + "libdwP.h", + "memory-access.h", + ] +} diff --git a/3rdparty/elfutils/libdwelf/libdwelf.qbs b/3rdparty/elfutils/libdwelf/libdwelf.qbs new file mode 100644 index 0000000..5c0933d --- /dev/null +++ b/3rdparty/elfutils/libdwelf/libdwelf.qbs @@ -0,0 +1,12 @@ +import qbs + +ElfUtilsStaticLib { + name: "dwelf" + files: [ + "dwelf_dwarf_gnu_debugaltlink.c", + "dwelf_elf_gnu_build_id.c", + "dwelf_elf_gnu_debuglink.c", + "libdwelf.h", + "libdwelfP.h", + ] +} diff --git a/3rdparty/elfutils/libdwfl/libdwfl.qbs b/3rdparty/elfutils/libdwfl/libdwfl.qbs new file mode 100644 index 0000000..7f7fbe3 --- /dev/null +++ b/3rdparty/elfutils/libdwfl/libdwfl.qbs @@ -0,0 +1,74 @@ +import qbs + +ElfUtilsStaticLib { + name: "dwfl" + files: [ + "argp-std.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_frame_pc.c", + "dwfl_frame_regs.c", + "dwfl_frame.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_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_file.c", + "dwfl_module_getsrc.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_module.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", + "frame_unwind.c", + "gzip.c", + "image-header.c", + "libdwfl_crc32_file.c", + "libdwfl_crc32.c", + "libdwfl.h", + "libdwflP.h", + "lines.c", + "link_map.c", + "linux-core-attach.c", + "linux-kernel-modules.c", + "linux-pid-attach.c", + "linux-proc-maps.c", + "offline.c", + "open.c", + "relocate.c", + "segment.c", + ] +} diff --git a/3rdparty/elfutils/libebl/libebl.qbs b/3rdparty/elfutils/libebl/libebl.qbs new file mode 100644 index 0000000..8bc49a3 --- /dev/null +++ b/3rdparty/elfutils/libebl/libebl.qbs @@ -0,0 +1,63 @@ +import qbs + +ElfUtilsStaticLib { + name: "ebl" + files: [ + "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", + "eblcheckreloctargettype.c", + "eblclosebackend.c", + "eblcopyrelocp.c", + "eblcorenote.c", + "eblcorenotetypename.c", + "ebldebugscnp.c", + "ebldwarftoregno.c", + "ebldynamictagcheck.c", + "ebldynamictagname.c", + "eblelfclass.c", + "eblelfdata.c", + "eblelfmachine.c", + "eblgotpcreloccheck.c", + "eblgstrtab.c", + "eblinitreg.c", + "eblmachineflagcheck.c", + "eblmachineflagname.c", + "eblmachinesectionflagcheck.c", + "eblnonerelocp.c", + "eblnormalizepc.c", + "eblobjecttypename.c", + "eblobjnote.c", + "eblobjnotetypename.c", + "eblopenbackend.c", + "eblosabiname.c", + "eblreginfo.c", + "eblrelativerelocp.c", + "eblrelocsimpletype.c", + "eblreloctypecheck.c", + "eblreloctypename.c", + "eblrelocvaliduse.c", + "eblresolvesym.c", + "eblretval.c", + "eblsectionname.c", + "eblsectionstripp.c", + "eblsectiontypename.c", + "eblsegmenttypename.c", + "eblshflagscombine.c", + "eblstother.c", + "eblstrtab.c", + "eblsymbolbindingname.c", + "eblsymboltypename.c", + "eblsysvhashentrysize.c", + "eblunwind.c", + "eblwstrtab.c", + "libebl.h", + "libeblP.h", + ] +} diff --git a/3rdparty/elfutils/libelf/elf32/elf32.qbs b/3rdparty/elfutils/libelf/elf32/elf32.qbs new file mode 100644 index 0000000..7b746a7 --- /dev/null +++ b/3rdparty/elfutils/libelf/elf32/elf32.qbs @@ -0,0 +1,22 @@ +import qbs + +ElfUtilsStaticLib { + name: "elf32" + Group { + prefix: "../" + files: [ + "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", + ] + } +} diff --git a/3rdparty/elfutils/libelf/elf64/elf64.qbs b/3rdparty/elfutils/libelf/elf64/elf64.qbs new file mode 100644 index 0000000..b52667a --- /dev/null +++ b/3rdparty/elfutils/libelf/elf64/elf64.qbs @@ -0,0 +1,22 @@ +import qbs + +ElfUtilsStaticLib { + name: "elf64" + Group { + prefix: "../" + files: [ + "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", + ] + } +} diff --git a/3rdparty/elfutils/libelf/libelf.qbs b/3rdparty/elfutils/libelf/libelf.qbs new file mode 100644 index 0000000..6ef6aa2 --- /dev/null +++ b/3rdparty/elfutils/libelf/libelf.qbs @@ -0,0 +1,108 @@ +import qbs + +ElfUtilsStaticLib { + name: "elf" + files: [ + "abstract.h", + "common.h", + "dl-hash.h", + "elf.h", + "elf-knowledge.h", + "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_rawchunk.c", + "elf_getdata.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_xlatetof.c", + "gelf_xlatetom.c", + "gelf_xlate.h", + "gnuhash_xlate.h", + "libelf.h", + "libelfP.h", + "libelf_crc32.c", + "libelf_next_prime.c", + "nlist.c", + "nlist.h", + "note_xlate.h", + "version_xlate.h", + ] +} diff --git a/3rdparty/elfutils/qbs/imports/DisHeader.qbs b/3rdparty/elfutils/qbs/imports/DisHeader.qbs new file mode 100644 index 0000000..9ceddfe --- /dev/null +++ b/3rdparty/elfutils/qbs/imports/DisHeader.qbs @@ -0,0 +1,35 @@ +import qbs +import qbs.FileInfo + +Product { + type: ["hpp"] + destinationDirectory: project.gendisOutDir + property string arch + name: arch + " disasm header" + Depends { name: "i386_gendis" } + Depends { name: arch + " mnemonics" } + + Rule { + inputsFromDependencies: ["application"] + Artifact { + filePath: FileInfo.joinPaths(product.destinationDirectory, product.arch + "_dis.h") + fileTags: product.type + } + prepare: { + var args = [ + "-f", FileInfo.joinPaths(product.sourceDirectory, "..", "extras.mk"), + "gendis=" + FileInfo.path(input.filePath), + "srcdir=" + FileInfo.joinPaths(product.sourceDirectory, ".."), + output.fileName + ]; + var cmd = new Command("make", args); + cmd.description = "Creating " + output.fileName; + cmd.workingDirectory = product.destinationDirectory; + return [cmd]; + } + } + Export { + Depends { name: "cpp" } + cpp.includePaths: [product.destinationDirectory] + } +} diff --git a/3rdparty/elfutils/qbs/imports/Disasm.qbs b/3rdparty/elfutils/qbs/imports/Disasm.qbs new file mode 100644 index 0000000..08474f2 --- /dev/null +++ b/3rdparty/elfutils/qbs/imports/Disasm.qbs @@ -0,0 +1,12 @@ +import qbs +import qbs.FileInfo + +ElfUtilsStaticLib { + property string arch + destinationDirectory: project.gendisOutDir + name: arch + " disasm" + Depends { name: arch + " disasm header" } + Depends { name: arch + " mnemonics" } + cpp.includePaths: base.concat([FileInfo.joinPaths(product.sourceDirectory, "..")]) + files: ["../" + arch + "_disasm.c"] +} diff --git a/3rdparty/elfutils/qbs/imports/ElfUtilsBackend.qbs b/3rdparty/elfutils/qbs/imports/ElfUtilsBackend.qbs new file mode 100644 index 0000000..2ab79e7 --- /dev/null +++ b/3rdparty/elfutils/qbs/imports/ElfUtilsBackend.qbs @@ -0,0 +1,29 @@ +import qbs +import qbs.FileInfo + +ElfUtilsDynamicLib { + property string arch + name: "ebl_" + arch + property stringList additionalSources: [] + property string backendDir: FileInfo.joinPaths(product.sourceDirectory, "..") + Depends { name: "dw" } + Depends { name: "elf" } + cpp.includePaths: base.concat([backendDir]) + cpp.allowUnresolvedSymbols: true + Group { + name: "sources" + prefix: "../" + arch + "_" + files: [ + "init.c", + "retval.c", + "symbol.c", + ].concat(additionalSources) + } + Group { + name: "headers" + fileTags: ["hpp"] + files: [ + "../" + arch + "_reloc.def" + ] + } +} diff --git a/3rdparty/elfutils/qbs/imports/ElfUtilsDynamicLib.qbs b/3rdparty/elfutils/qbs/imports/ElfUtilsDynamicLib.qbs new file mode 100644 index 0000000..05b94db --- /dev/null +++ b/3rdparty/elfutils/qbs/imports/ElfUtilsDynamicLib.qbs @@ -0,0 +1,5 @@ +import qbs + +ElfUtilsProduct { + type: ["dynamiclibrary"] +} diff --git a/3rdparty/elfutils/qbs/imports/ElfUtilsProduct.qbs b/3rdparty/elfutils/qbs/imports/ElfUtilsProduct.qbs new file mode 100644 index 0000000..bcb0b74 --- /dev/null +++ b/3rdparty/elfutils/qbs/imports/ElfUtilsProduct.qbs @@ -0,0 +1,21 @@ +import qbs +import qbs.FileInfo + +Product { + Depends { name: "cpp" } + version: "0.161" + cpp.cFlags: ["-std=gnu99"] + cpp.defines: ["HAVE_CONFIG_H", "_GNU_SOURCE"] + property string elfUtilsDir: FileInfo.joinPaths(path, "..", "..") + cpp.includePaths: [ + elfUtilsDir, + FileInfo.joinPaths(elfUtilsDir, "lib"), + FileInfo.joinPaths(elfUtilsDir, "libasm"), + FileInfo.joinPaths(elfUtilsDir, "libdw"), + FileInfo.joinPaths(elfUtilsDir, "libdwelf"), + FileInfo.joinPaths(elfUtilsDir, "libdwfl"), + FileInfo.joinPaths(elfUtilsDir, "libebl"), + FileInfo.joinPaths(elfUtilsDir, "libelf"), + product.sourceDirectory, + ] +} diff --git a/3rdparty/elfutils/qbs/imports/ElfUtilsStaticLib.qbs b/3rdparty/elfutils/qbs/imports/ElfUtilsStaticLib.qbs new file mode 100644 index 0000000..b3a9d86 --- /dev/null +++ b/3rdparty/elfutils/qbs/imports/ElfUtilsStaticLib.qbs @@ -0,0 +1,10 @@ +import qbs + +ElfUtilsProduct { + type: ["staticlibrary"] + + Export { + Depends { name: "cpp" } + cpp.includePaths: [product.sourceDirectory] + } +} diff --git a/app/app.qbs b/app/app.qbs new file mode 100644 index 0000000..eb948fc --- /dev/null +++ b/app/app.qbs @@ -0,0 +1,39 @@ +import qbs + +QtApplication { + name: "perfparser" + consoleApplication: true + + Depends { name: "dw" } + Depends { name: "dwelf" } + Depends { name: "dwfl" } + Depends { name: "ebl" } + Depends { name: "elf" } + Depends { name: "elf32" } + Depends { name: "elf64" } + + Depends { name: "Qt.network" } + + cpp.allowUnresolvedSymbols: true + cpp.cxxLanguageVersion: "c++11" + + files: [ + "main.cpp", + "perfattributes.cpp", + "perfattributes.h", + "perfheader.cpp", + "perfheader.h", + "perffilesection.cpp", + "perffilesection.h", + "perffeatures.cpp", + "perffeatures.h", + "perfdata.cpp", + "perfdata.h", + "perfunwind.cpp", + "perfunwind.h", + "perfregisterinfo.cpp", + "perfregisterinfo.h", + "perfstdin.cpp", + "perfstdin.h", + ] +} diff --git a/perfparser.qbs b/perfparser.qbs new file mode 100644 index 0000000..43d10f8 --- /dev/null +++ b/perfparser.qbs @@ -0,0 +1,9 @@ +import qbs + +Project { + name: "Perf Parser" + references: [ + "3rdparty/elfutils", + "app", + ] +} |