From nobody Mon Dec 06 16:33:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3450A18B36EE; Mon, 6 Dec 2021 16:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J78B72kYmz3C4K; Mon, 6 Dec 2021 16:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50D6B6FD1; Mon, 6 Dec 2021 16:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B6GXIv1087510; Mon, 6 Dec 2021 16:33:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6GXI0A087509; Mon, 6 Dec 2021 16:33:18 GMT (envelope-from git) Date: Mon, 6 Dec 2021 16:33:18 GMT Message-Id: <202112061633.1B6GXI0A087509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e52de8a91581 - stable/13 - llvm-readobj: Attach to buildsystem List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e52de8a915810e793994ccf1298804fbb13d786b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638808400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RTgyVQQbeaN2Vd8iTOMCz2LFKuO7v12nbzTVdXHkWUg=; b=XEGAYtoqlUa23S5DQOzXXTvh3BsUciR/JPYR92vo51XIw07prVGUKPRkUXozD6LQs6+e8/ mV8Cx+1JaP56gu3+a4x+OogulvgOnRWUK8MFWKzKZI7O3av6VGlmFZ4K+aw9c480rDq8gT l8o1YXxpS1gsgtBdgoxq7oiJ9Llu1oSP140TATPK+RngGC1BUshmLzccz5AhzsrnjLh+8D iypSEE1GbAawhVvqisdB/pls3iE8k2yWRocZrPAaA5HSzpwHhVgwM8WtXnseXG27m5+bx2 jNIbWF+9ixUUu0oCjRX/W4saOs7RzDWLgETDrDdtYARrmqH4srLeV5Ca4R9o4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638808400; a=rsa-sha256; cv=none; b=f5HO32jtJ3dfa7YFw5NqMbeKL85lKDcUeifg8vm9YOoVQZt5c2zQBB6FadyFY2SqWHlbg0 BqjP8b6huc/Qvklikts8hjT2CQhsT0qskamiEQZMwN6J8n2oSI4+6Gq7T6y6R+95rhtVWe gjtNvkQkyzrUaAFya7iF0mxzJ+q2mcgO8unK3TZAX0B+nzNk+fiREItmxCUfT0+xKVUjZz yqP4KZRkqDt5mXKUgapFZV0uBOAR8tgukh+fcd8D29GiGzQDjj/oGRUy07zclGXFZ7fKsc W4ope5MTfmEzQQAtfuej86SUthI/oFUvsHhjG62xGgw9u+T7OE2qty9KEilLxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e52de8a915810e793994ccf1298804fbb13d786b commit e52de8a915810e793994ccf1298804fbb13d786b Author: Cameron Katri AuthorDate: 2021-10-14 16:00:27 +0000 Commit: Dimitry Andric CommitDate: 2021-12-06 16:30:05 +0000 llvm-readobj: Attach to buildsystem Also install it as readelf when MK_LLVM_BINUTILS is set. Reviewed By: dim, arichardson Differential Revision: https://reviews.freebsd.org/D32058 (cherry picked from commit 1b85b68da0b2de80e0e3aefb1ade226bcf3951cb) --- lib/clang/libllvm/Makefile | 21 +- tools/build/mk/OptionalObsoleteFiles.inc | 4 + usr.bin/clang/Makefile | 1 + usr.bin/clang/llvm-readobj/Makefile | 31 +++ usr.bin/clang/llvm-readobj/llvm-readelf.1 | 272 ++++++++++++++++++++ usr.bin/clang/llvm-readobj/llvm-readobj.1 | 403 ++++++++++++++++++++++++++++++ 6 files changed, 724 insertions(+), 8 deletions(-) diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 84276f234d02..ae053281feb8 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -149,9 +149,13 @@ SRCS_MIN+= Analysis/VectorUtils.cpp SRCS_MIN+= AsmParser/LLLexer.cpp SRCS_MIN+= AsmParser/LLParser.cpp SRCS_MIN+= AsmParser/Parser.cpp +SRCS_MIN+= BinaryFormat/AMDGPUMetadataVerifier.cpp SRCS_MIN+= BinaryFormat/Dwarf.cpp SRCS_MIN+= BinaryFormat/Magic.cpp SRCS_MIN+= BinaryFormat/MachO.cpp +SRCS_MIN+= BinaryFormat/MsgPackDocument.cpp +SRCS_MIN+= BinaryFormat/MsgPackDocumentYAML.cpp +SRCS_MIN+= BinaryFormat/MsgPackReader.cpp SRCS_MIN+= BinaryFormat/Wasm.cpp SRCS_MIN+= BinaryFormat/XCOFF.cpp SRCS_MIN+= Bitcode/Reader/BitReader.cpp @@ -442,14 +446,14 @@ SRCS_MIN+= DebugInfo/CodeView/CVTypeVisitor.cpp SRCS_MIN+= DebugInfo/CodeView/CodeViewError.cpp SRCS_MIN+= DebugInfo/CodeView/CodeViewRecordIO.cpp SRCS_MIN+= DebugInfo/CodeView/ContinuationRecordBuilder.cpp -SRCS_EXT+= DebugInfo/CodeView/DebugChecksumsSubsection.cpp +SRCS_MIN+= DebugInfo/CodeView/DebugChecksumsSubsection.cpp SRCS_EXT+= DebugInfo/CodeView/DebugCrossExSubsection.cpp SRCS_EXT+= DebugInfo/CodeView/DebugCrossImpSubsection.cpp -SRCS_EXT+= DebugInfo/CodeView/DebugFrameDataSubsection.cpp -SRCS_EXT+= DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp -SRCS_EXT+= DebugInfo/CodeView/DebugLinesSubsection.cpp -SRCS_EXT+= DebugInfo/CodeView/DebugStringTableSubsection.cpp -SRCS_EXT+= DebugInfo/CodeView/DebugSubsection.cpp +SRCS_MIN+= DebugInfo/CodeView/DebugFrameDataSubsection.cpp +SRCS_MIN+= DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp +SRCS_MIN+= DebugInfo/CodeView/DebugLinesSubsection.cpp +SRCS_MIN+= DebugInfo/CodeView/DebugStringTableSubsection.cpp +SRCS_MIN+= DebugInfo/CodeView/DebugSubsection.cpp SRCS_EXT+= DebugInfo/CodeView/DebugSubsectionRecord.cpp SRCS_EXT+= DebugInfo/CodeView/DebugSubsectionVisitor.cpp SRCS_EXT+= DebugInfo/CodeView/DebugSymbolRVASubsection.cpp @@ -457,9 +461,9 @@ SRCS_EXT+= DebugInfo/CodeView/DebugSymbolsSubsection.cpp SRCS_MIN+= DebugInfo/CodeView/EnumTables.cpp SRCS_MIN+= DebugInfo/CodeView/Formatters.cpp SRCS_MIN+= DebugInfo/CodeView/GlobalTypeTableBuilder.cpp -SRCS_EXT+= DebugInfo/CodeView/LazyRandomTypeCollection.cpp +SRCS_MIN+= DebugInfo/CodeView/LazyRandomTypeCollection.cpp SRCS_MIN+= DebugInfo/CodeView/Line.cpp -SRCS_EXT+= DebugInfo/CodeView/MergingTypeTableBuilder.cpp +SRCS_MIN+= DebugInfo/CodeView/MergingTypeTableBuilder.cpp SRCS_MIN+= DebugInfo/CodeView/RecordName.cpp SRCS_MIN+= DebugInfo/CodeView/RecordSerialization.cpp SRCS_MIN+= DebugInfo/CodeView/SimpleTypeSerializer.cpp @@ -913,6 +917,7 @@ SRCS_MIN+= Support/APSInt.cpp SRCS_MIN+= Support/ARMAttributeParser.cpp SRCS_MIN+= Support/ARMBuildAttrs.cpp SRCS_MIN+= Support/ARMTargetParser.cpp +SRCS_MIN+= Support/ARMWinEH.cpp SRCS_MIN+= Support/Allocator.cpp SRCS_MIN+= Support/BinaryStreamError.cpp SRCS_MIN+= Support/BinaryStreamReader.cpp diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index fc6cc9080bbd..90e71f342b0e 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1229,6 +1229,8 @@ OLD_FILES+=usr/bin/llvm-nm OLD_FILES+=usr/bin/llvm-objcopy OLD_FILES+=usr/bin/llvm-objdump OLD_FILES+=usr/bin/llvm-ranlib +OLD_FILES+=usr/bin/llvm-readelf +OLD_FILES+=usr/bin/llvm-readobj OLD_FILES+=usr/bin/llvm-size OLD_FILES+=usr/bin/llvm-strings OLD_FILES+=usr/bin/llvm-symbolizer @@ -1237,6 +1239,8 @@ OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz +OLD_FILES+=usr/share/man/man1/llvm-readelf.1.gz +OLD_FILES+=usr/share/man/man1/llvm-readobj.1.gz OLD_FILES+=usr/share/man/man1/llvm-size.1.gz OLD_FILES+=usr/share/man/man1/llvm-strings.1.gz OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile index 7fc31e8df194..b7acb7e6c6db 100644 --- a/usr.bin/clang/Makefile +++ b/usr.bin/clang/Makefile @@ -15,6 +15,7 @@ SUBDIR+= llvm-ar SUBDIR+= llvm-nm SUBDIR+= llvm-objcopy SUBDIR+= llvm-objdump +SUBDIR+= llvm-readobj SUBDIR+= llvm-size SUBDIR+= llvm-strings SUBDIR+= llvm-symbolizer diff --git a/usr.bin/clang/llvm-readobj/Makefile b/usr.bin/clang/llvm-readobj/Makefile new file mode 100644 index 000000000000..71116fcc3955 --- /dev/null +++ b/usr.bin/clang/llvm-readobj/Makefile @@ -0,0 +1,31 @@ +# $FreeBSD$ + +.include + +PROG_CXX= llvm-readobj +MAN= llvm-readobj.1 llvm-readelf.1 + +SRCDIR= llvm/tools/llvm-readobj +SRCS+= ARMWinEHPrinter.cpp +SRCS+= COFFDumper.cpp +SRCS+= COFFImportDumper.cpp +SRCS+= ELFDumper.cpp +SRCS+= llvm-readobj.cpp +SRCS+= MachODumper.cpp +SRCS+= ObjDumper.cpp +SRCS+= WasmDumper.cpp +SRCS+= Win64EHDumper.cpp +SRCS+= WindowsResourceDumper.cpp +SRCS+= XCOFFDumper.cpp + +LIBADD+= z + +LINKS+= ${BINDIR}/llvm-readobj ${BINDIR}/llvm-readelf +MLINKS= llvm-readobj.1 + +.if ${MK_LLVM_BINUTILS} != "no" +LINKS+= ${BINDIR}/llvm-readelf ${BINDIR}/readelf +MLINKS+= llvm-readelf.1 readelf.1 +.endif + +.include "../llvm.prog.mk" diff --git a/usr.bin/clang/llvm-readobj/llvm-readelf.1 b/usr.bin/clang/llvm-readobj/llvm-readelf.1 new file mode 100644 index 000000000000..9bfaf88409d7 --- /dev/null +++ b/usr.bin/clang/llvm-readobj/llvm-readelf.1 @@ -0,0 +1,272 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LLVM-READELF" "1" "2021-09-22" "12" "LLVM" +.SH NAME +llvm-readelf \- GNU-style LLVM Object Reader +.SH SYNOPSIS +.sp +\fBllvm\-readelf\fP [\fIoptions\fP] [\fIinput...\fP] +.SH DESCRIPTION +.sp +The \fBllvm\-readelf\fP tool displays low\-level format\-specific information +about one or more object files. +.sp +If \fBinput\fP is "\fB\-\fP", \fBllvm\-readelf\fP reads from standard +input. Otherwise, it will read from the specified \fBfilenames\fP\&. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-\-all +Equivalent to specifying all the main display options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-addrsig +Display the address\-significance table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-arch\-specific, \-A +Display architecture\-specific information, e.g. the ARM attributes section on ARM. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-color +Use colors in the output for warnings and errors. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-demangle, \-C +Display demangled symbol names in the output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dyn\-relocations +Display the dynamic relocation entries. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dyn\-symbols, \-\-dyn\-syms +Display the dynamic symbol table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dynamic\-table, \-\-dynamic, \-d +Display the dynamic table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-cg\-profile +Display the callgraph profile section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-hash\-histogram, \-\-histogram, \-I +Display a bucket list histogram for dynamic symbol hash tables. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-linker\-options +Display the linker options section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-output\-style= +Format ELF information in the specified style. Valid options are \fBLLVM\fP and +\fBGNU\fP\&. \fBLLVM\fP output is an expanded and structured format, whilst \fBGNU\fP +(the default) output mimics the equivalent GNU \fBreadelf\fP output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-section\-groups, \-\-section\-groups, \-g +Display section groups. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-expand\-relocs +When used with \fI\%\-\-relocations\fP, display each relocation in an expanded +multi\-line format. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-file\-headers, \-h +Display file headers. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-gnu\-hash\-table +Display the GNU hash table for dynamic symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-hash\-symbols +Display the expanded hash table with dynamic symbol data. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-hash\-table +Display the hash table for dynamic symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-headers, \-e +Equivalent to setting: \fI\%\-\-file\-headers\fP, \fI\%\-\-program\-headers\fP, +and \fI\%\-\-sections\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help +Display a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help\-list +Display an uncategorized summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-hex\-dump=, \-x +Display the specified section(s) as hexadecimal bytes. \fBsection\fP may be a +section index or section name. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-needed\-libs +Display the needed libraries. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-notes, \-n +Display all notes. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-program\-headers, \-\-segments, \-l +Display the program headers. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-raw\-relr +Do not decode relocations in RELR relocation sections when displaying them. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-relocations, \-\-relocs, \-r +Display the relocation entries in the file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sections, \-\-section\-headers, \-S +Display all sections. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-data +When used with \fI\%\-\-sections\fP, display section data for each section +shown. This option has no effect for GNU style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-details, \-t +Display all section details. Used as an alternative to \fI\%\-\-sections\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-mapping +Display the section to segment mapping. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-relocations +When used with \fI\%\-\-sections\fP, display relocations for each section +shown. This option has no effect for GNU style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-symbols +When used with \fI\%\-\-sections\fP, display symbols for each section shown. +This option has no effect for GNU style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-stackmap +Display contents of the stackmap section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-stack\-sizes +Display the contents of the stack sizes section(s), i.e. pairs of function +names and the size of their stack frames. Currently only implemented for GNU +style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-string\-dump=, \-p +Display the specified section(s) as a list of strings. \fBsection\fP may be a +section index or section name. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-symbols, \-\-syms, \-s +Display the symbol table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-unwind, \-u +Display unwind information. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version +Display the version of the \fBllvm\-readelf\fP executable. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version\-info, \-V +Display version sections. +.UNINDENT +.INDENT 0.0 +.TP +.B @ +Read command\-line options from response file \fI\fP\&. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-readelf\fP returns 0 under normal operation. It returns a non\-zero +exit code if there were any errors. +.SH SEE ALSO +.sp +\fBllvm\-nm(1)\fP, \fBllvm\-objdump(1)\fP, \fBllvm\-readobj(1)\fP +.SH AUTHOR +Maintained by the LLVM Team (https://llvm.org/). +.SH COPYRIGHT +2003-2021, LLVM Project +.\" Generated by docutils manpage writer. +. diff --git a/usr.bin/clang/llvm-readobj/llvm-readobj.1 b/usr.bin/clang/llvm-readobj/llvm-readobj.1 new file mode 100644 index 000000000000..5b0597e22048 --- /dev/null +++ b/usr.bin/clang/llvm-readobj/llvm-readobj.1 @@ -0,0 +1,403 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LLVM-READOBJ" "1" "2021-09-22" "12" "LLVM" +.SH NAME +llvm-readobj \- LLVM Object Reader +.SH SYNOPSIS +.sp +\fBllvm\-readobj\fP [\fIoptions\fP] [\fIinput...\fP] +.SH DESCRIPTION +.sp +The \fBllvm\-readobj\fP tool displays low\-level format\-specific information +about one or more object files. +.sp +If \fBinput\fP is "\fB\-\fP", \fBllvm\-readobj\fP reads from standard +input. Otherwise, it will read from the specified \fBfilenames\fP\&. +.SH DIFFERENCES TO LLVM-READELF +.sp +\fBllvm\-readelf\fP is an alias for the \fBllvm\-readobj\fP tool with a +slightly different command\-line interface and output that is GNU compatible. +Following is a list of differences between \fBllvm\-readelf\fP and +\fBllvm\-readobj\fP: +.INDENT 0.0 +.IP \(bu 2 +\fBllvm\-readelf\fP uses \fIGNU\fP for the \fI\%\-\-elf\-output\-style\fP option +by default. \fBllvm\-readobj\fP uses \fILLVM\fP\&. +.IP \(bu 2 +\fBllvm\-readelf\fP allows single\-letter grouped flags (e.g. +\fBllvm\-readelf \-SW\fP is the same as \fBllvm\-readelf \-S \-W\fP). +\fBllvm\-readobj\fP does not allow grouping. +.IP \(bu 2 +\fBllvm\-readelf\fP provides \fI\%\-s\fP as an alias for +\fI\%\-\-symbols\fP, for GNU \fBreadelf\fP compatibility, whereas it is +an alias for \fI\%\-\-section\-headers\fP in \fBllvm\-readobj\fP\&. +.IP \(bu 2 +\fBllvm\-readobj\fP provides \fB\-t\fP as an alias for \fI\%\-\-symbols\fP\&. +\fBllvm\-readelf\fP does not. +.IP \(bu 2 +\fBllvm\-readobj\fP provides \fB\-\-sr\fP, \fB\-\-sd\fP, \fB\-\-st\fP and \fB\-\-dt\fP as +aliases for \fI\%\-\-section\-relocations\fP, \fI\%\-\-section\-data\fP, +\fI\%\-\-section\-symbols\fP and \fI\%\-\-dyn\-symbols\fP respectively. +\fBllvm\-readelf\fP does not provide these aliases, to avoid conflicting +with grouped flags. +.UNINDENT +.SH GENERAL AND MULTI-FORMAT OPTIONS +.sp +These options are applicable to more than one file format, or are unrelated to +file formats. +.INDENT 0.0 +.TP +.B \-\-all +Equivalent to specifying all the main display options relevant to the file +format. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-addrsig +Display the address\-significance table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-color +Use colors in the output for warnings and errors. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-expand\-relocs +When used with \fI\%\-\-relocations\fP, display each relocation in an expanded +multi\-line format. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-file\-headers, \-h +Display file headers. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-headers, \-e +Equivalent to setting: \fI\%\-\-file\-headers\fP, \fI\%\-\-program\-headers\fP, +and \fI\%\-\-sections\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help +Display a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help\-list +Display an uncategorized summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-hex\-dump=, \-x +Display the specified section(s) as hexadecimal bytes. \fBsection\fP may be a +section index or section name. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-needed\-libs +Display the needed libraries. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-relocations, \-\-relocs, \-r +Display the relocation entries in the file. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sections, \-\-section\-headers, \-s, \-S +Display all sections. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-data, \-\-sd +When used with \fI\%\-\-sections\fP, display section data for each section +shown. This option has no effect for GNU style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-relocations, \-\-sr +When used with \fI\%\-\-sections\fP, display relocations for each section +shown. This option has no effect for GNU style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-symbols, \-\-st +When used with \fI\%\-\-sections\fP, display symbols for each section shown. +This option has no effect for GNU style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-stackmap +Display contents of the stackmap section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-string\-dump=, \-p +Display the specified section(s) as a list of strings. \fBsection\fP may be a +section index or section name. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-symbols, \-\-syms, \-t +Display the symbol table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-unwind, \-u +Display unwind information. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version +Display the version of the \fBllvm\-readobj\fP executable. +.UNINDENT +.INDENT 0.0 +.TP +.B @ +Read command\-line options from response file \fI\fP\&. +.UNINDENT +.SH ELF SPECIFIC OPTIONS +.sp +The following options are implemented only for the ELF file format. +.INDENT 0.0 +.TP +.B \-\-arch\-specific, \-A +Display architecture\-specific information, e.g. the ARM attributes section on ARM. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-demangle, \-C +Display demangled symbol names in the output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dependent\-libraries +Display the dependent libraries section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dyn\-relocations +Display the dynamic relocation entries. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dyn\-symbols, \-\-dyn\-syms, \-\-dt +Display the dynamic symbol table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-dynamic\-table, \-\-dynamic, \-d +Display the dynamic table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-cg\-profile +Display the callgraph profile section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-hash\-histogram, \-\-histogram, \-I +Display a bucket list histogram for dynamic symbol hash tables. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-linker\-options +Display the linker options section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-output\-style= +Format ELF information in the specified style. Valid options are \fBLLVM\fP and +\fBGNU\fP\&. \fBLLVM\fP output (the default) is an expanded and structured format, +whilst \fBGNU\fP output mimics the equivalent GNU \fBreadelf\fP output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-elf\-section\-groups, \-\-section\-groups, \-g +Display section groups. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-gnu\-hash\-table +Display the GNU hash table for dynamic symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-hash\-symbols +Display the expanded hash table with dynamic symbol data. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-hash\-table +Display the hash table for dynamic symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-notes, \-n +Display all notes. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-program\-headers, \-\-segments, \-l +Display the program headers. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-raw\-relr +Do not decode relocations in RELR relocation sections when displaying them. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-section\-mapping +Display the section to segment mapping. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-stack\-sizes +Display the contents of the stack sizes section(s), i.e. pairs of function +names and the size of their stack frames. Currently only implemented for GNU +style output. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version\-info, \-V +Display version sections. +.UNINDENT +.SH MACH-O SPECIFIC OPTIONS +.sp +The following options are implemented only for the Mach\-O file format. +.INDENT 0.0 +.TP +.B \-\-macho\-data\-in\-code +Display the Data in Code command. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-macho\-dsymtab +Display the Dsymtab command. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-macho\-indirect\-symbols +Display indirect symbols. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-macho\-linker\-options +Display the Mach\-O\-specific linker options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-macho\-segment +Display the Segment command. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-macho\-version\-min +Display the version min command. +.UNINDENT +.SH PE/COFF SPECIFIC OPTIONS +.sp +The following options are implemented only for the PE/COFF file format. +.INDENT 0.0 +.TP +.B \-\-codeview +Display CodeView debug information. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-codeview\-ghash +Enable global hashing for CodeView type stream de\-duplication. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-codeview\-merged\-types +Display the merged CodeView type stream. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-codeview\-subsection\-bytes +Dump raw contents of CodeView debug sections and records. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-basereloc +Display the .reloc section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-debug\-directory +Display the debug directory. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-tls\-directory +Display the TLS directory. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-directives +Display the .drectve section. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-exports +Display the export table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-imports +Display the import table. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-load\-config +Display the load config. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-coff\-resources +Display the .rsrc section. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-readobj\fP returns 0 under normal operation. It returns a non\-zero +exit code if there were any errors. +.SH SEE ALSO +.sp +\fBllvm\-nm(1)\fP, \fBllvm\-objdump(1)\fP, \fBllvm\-readelf(1)\fP +.SH AUTHOR +Maintained by the LLVM Team (https://llvm.org/). +.SH COPYRIGHT +2003-2021, LLVM Project +.\" Generated by docutils manpage writer. +.