aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ObjectFile.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-01-16[clang][Driver] Don't ignore -gmodules .gch files (#77711)Michael Spencer1-0/+1
A previous commit (82f75ed) made clang ignore .gch files that were not Clang AST files. This broke `-gmodules`, which embeds the Clang AST into an object file containing debug info. This changes the probing to detect any file format recognized by `llvm::identify_magic()` as potentially containing a Clang AST. Previous PR: https://github.com/llvm/llvm-project/pull/69204
2024-01-05[ELF] Attempt to set the OS when using 'makeTriple()' (#76992)Joseph Huber1-2/+9
Summary: This patch fixes up the `makeTriple()` interface to emit append the operating system information when it is readily avaialble from the ELF. The main motivation for this is so the GPU architectures can be easily identified correctly when given and ELF. E.g. we want `amdgpu-amd-amdhsa` as the output and not `amdgpu--`. This required adding support for the CUDA OS/ABI, which is easily found to be `0x33` when using `readelf`.
2023-12-13[LLVM] Add file magic detection for SPIR-V files. (#75363)Joseph Huber1-0/+1
Summary: More SPIR-V related patches are being upstreamed. We should add support to detect when a binary file is SPIR-V. This will be used in the future when support for SPIR-V is added to the offloading runtime or more support for bundling. The magic number is described in the official documentation: https://registry.khronos.org/SPIR-V/specs/1.0/SPIRV.html#Magic. Notably, SPIR-V files are streams of 32-bit words. This means that the magic numbers differ depending on the endianness. Here we simply check the strandard and byte-reversed versions.
2023-10-05Reland "[HIP] Support compressing device binary"Yaxun (Sam) Liu1-0/+2
Original PR: https://github.com/llvm/llvm-project/pull/67162 The commit was reverted due to UB detected by santizer: https://lab.llvm.org/buildbot/#/builders/238/builds/5955 clang/lib/Driver/OffloadBundler.cpp:1012:25: runtime error: load of misaligned address 0xaaaae2d90e7c for type 'const uint64_t' (aka 'const unsigned long'), which requires 8 byte alignment It was fixed by using memcpy instead of dereferencing int* casted from unaligned char*.
2023-10-05Revert "[HIP] Support compressing device binary (#67162)"Yaxun (Sam) Liu1-2/+0
This reverts commit a1e81d2ead02e041471ec2299d7382f80c4dbba6. Revert "Fix test hip-offload-compress-zlib.hip" This reverts commit ba01ce60665848478ba4e76190907153a8c26fe9. Revert due to sanity fail at https://lab.llvm.org/buildbot/#/builders/5/builds/37188 https://lab.llvm.org/buildbot/#/builders/238/builds/5955 /b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Driver/OffloadBundler.cpp:1012:25: runtime error: load of misaligned address 0xaaaae2d90e7c for type 'const uint64_t' (aka 'const unsigned long'), which requires 8 byte alignment 0xaaaae2d90e7c: note: pointer points here bc 00 00 00 94 dc 29 9a 89 fb ca 2b 78 9c 8b 8f 77 f6 71 f4 73 8f f7 77 73 f3 f1 77 74 89 77 0a ^ #0 0xaaaaba125f70 in clang::CompressedOffloadBundle::decompress(llvm::MemoryBuffer const&, bool) /b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Driver/OffloadBundler.cpp:1012:25 #1 0xaaaaba126150 in clang::OffloadBundler::ListBundleIDsInFile(llvm::StringRef, clang::OffloadBundlerConfig const&) /b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Driver/OffloadBundler.cpp:1089:7 Will reland after fixing it.
2023-10-04[HIP] Support compressing device binary (#67162)Yaxun (Sam) Liu1-0/+2
Add option -f[no-]offload-compress to clang to enable/disable compression of device binary for HIP. By default it is disabled. Add option -compress to clang-offload-bundler to enable compression of offload bundle. By default it is disabled. When enabled, zstd or zlib is used for compression when available. When disabled, it is NFC compared to previous behavior. The same offload bundle format is used as before. Clang-offload-bundler automatically detects whether the input file to be unbundled is compressed and the compression method and decompress if necessary.
2023-08-18Reland "[gold] Add preliminary FatLTO support to the Gold plugin""Paul Kirth1-1/+1
This changes the definition if isSectionBitcode to only be valid for the .llvm.lto section, since this API is only called from LTO, and the .llvmbc section was not intended to be used for LTO. This allows the gold plugin to keep its existing behavior without introducing any significant changes. Reviewed By: MaskRay, nikic Differential Revision: https://reviews.llvm.org/D152973
2023-07-20Revert "[gold] Add preliminary FatLTO support to the Gold plugin"Paul Kirth1-1/+1
This reverts commit 421e4026111315d002879b1e7a0cf3aacd00f488. One of the test needs a requires line, but we've also seen some issues for downstream projects that may need coordination, so I'm reverting this for until we can address those issues. see https://reviews.llvm.org/D152973#4520240 for context.
2023-07-19[gold] Add preliminary FatLTO support to the Gold pluginPaul Kirth1-1/+1
This changes the definition if `isSectionBitcode` to only be valid for the `.llvm.lto` section, since this API is only called from LTO, and the `.llvmbc` section was not intended to be used for LTO. This allows the gold plugin to keep its existing behavior without introducing any significant changes. Depends on D146778 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D152973
2023-06-28Reland [llvm] Preliminary fat-lto-objects supportPaul Kirth1-1/+1
Fat LTO objects contain both LTO compatible IR, as well as generated object code. This allows users to defer the choice of whether to use LTO or not to link-time. This is a feature available in GCC for some time, and makes the existing -ffat-lto-objects flag functional in the same way as GCC's. Within LLVM, we add a new EmbedBitcodePass that serializes the module to the object file, and expose a new pass pipeline for compiling fat objects. The new pipeline initially clones the module and runs the selected (Thin)LTOPrelink pipeline, after which it will serialize the module into a `.llvm.lto` section of an ELF file. When compiling for (Thin)LTO, this normally the point at which the compiler would emit a object file containing the bitcode and metadata. After that point we compile the original module using the PerModuleDefaultPipeline used for non-LTO compilation. We generate standard object files at the end of this pipeline, which contain machine code and the new `.llvm.lto` section containing bitcode. Since the two pipelines operate on different copies of the module, we can be sure that the bitcode in the `.llvm.lto` section and object code in `.text` are congruent with the existing output produced by the default and LTO pipelines. Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977 Earlier versions of this patch were missing REQUIRES lines for llc related tests in Transforms/EmbedBitcode. Those tests are now under CodeGen/X86, which should avoid running the check on unsupported platforms. The EmbedbBitcodePass also returned PreservedAnalyses::all when adding a metadata section, which failed expensive checks, since it modified the module. This is now corrected. Reviewed By: tejohnson, MaskRay, nikic Differential Revision: https://reviews.llvm.org/D146776
2023-06-24Revert "Reland [llvm] Preliminary fat-lto-objects support"Alex Brachet1-1/+1
This reverts commit 44265dc3554ef40920b587eeb787a400663af6c7.
2023-06-23Reland [llvm] Preliminary fat-lto-objects supportPaul Kirth1-1/+1
Fat LTO objects contain both LTO compatible IR, as well as generated object code. This allows users to defer the choice of whether to use LTO or not to link-time. This is a feature available in GCC for some time, and makes the existing -ffat-lto-objects flag functional in the same way as GCC's. Within LLVM, we add a new EmbedBitcodePass that serializes the module to the object file, and expose a new pass pipeline for compiling fat objects. The new pipeline initially clones the module and runs the selected (Thin)LTOPrelink pipeline, after which it will serialize the module into a `.llvm.lto` section of an ELF file. When compiling for (Thin)LTO, this normally the point at which the compiler would emit a object file containing the bitcode and metadata. After that point we compile the original module using the PerModuleDefaultPipeline used for non-LTO compilation. We generate standard object files at the end of this pipeline, which contain machine code and the new `.llvm.lto` section containing bitcode. Since the two pipelines operate on different copies of the module, we can be sure that the bitcode in the `.llvm.lto` section and object code in `.text` are congruent with the existing output produced by the default and LTO pipelines. Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977 Earlier versions of this patch were missing REQUIRES lines for llc related tests in Transforms/EmbedBitcode. Those tests are now under CodeGen/X86, which should avoid running the check on unsupported platforms. Reviewed By: tejohnson, MaskRay, nikic Differential Revision: https://reviews.llvm.org/D146776
2023-06-23Revert "[llvm] Preliminary fat-lto-objects support"Paul Kirth1-1/+1
There seems to be a problem on arm buildbots. Reverting until I can investigate. https://lab.llvm.org/buildbot#builders/245/builds/10184 This reverts commit a67208e1c697649ce432e6497f56a93675273dd8 and dependent commit e54a3112cee5ae0a9117359ecbea878e1388f51e.
2023-06-23[llvm] Preliminary fat-lto-objects supportPaul Kirth1-1/+1
Fat LTO objects contain both LTO compatible IR, as well as generated object code. This allows users to defer the choice of whether to use LTO or not to link-time. This is a feature available in GCC for some time, and makes the existing -ffat-lto-objects flag functional in the same way as GCC's. Within LLVM, we add a new EmbedBitcodePass that serializes the module to the object file, and expose a new pass pipeline for compiling fat objects. The new pipeline initially clones the module and runs the selected (Thin)LTOPrelink pipeline, after which it will serialize the module into a `.llvm.lto` section of an ELF file. When compiling for (Thin)LTO, this normally the point at which the compiler would emit a object file containing the bitcode and metadata. After that point we compile the original module using the PerModuleDefaultPipeline used for non-LTO compilation. We generate standard object files at the end of this pipeline, which contain machine code and the new `.llvm.lto` section containing bitcode. Since the two pipelines operate on different copies of the module, we can be sure that the bitcode in the `.llvm.lto` section and object code in `.text` are congruent with the existing output produced by the default and LTO pipelines. Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977 Reviewed By: tejohnson, MaskRay, nikic Differential Revision: https://reviews.llvm.org/D146776
2023-04-28[SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END recordsYusra Syeda1-0/+4
This patch details the GOFF file format and implements the GOFFObjectfile class with support for only the HDR, ESD and END GOFF records. Reviewed By: jhenderson, kpn Differential Revision: https://reviews.llvm.org/D98437
2023-04-28Revert "[SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and ↵Neumann Hon1-4/+0
END records" This reverts commit 5b2423183cb35703723ec91ce5b93b99cec36fb2.
2023-04-28[SystemZ][z/OS] Add GOFFObjectFile class support for HDR, ESD and END recordsNeumann Hon1-0/+4
This patch details the GOFF file format and implements the GOFFObjectfile class with support for only the HDR, ESD and END GOFF records. Reviewed By: jhenderson, kpn Differential Revision: https://reviews.llvm.org/D98437
2022-09-28[NFC] [Object] Create library to fetch debug info by build ID.Daniel Thornburgh1-0/+5
This creates a library for fetching debug info by build ID, whether locally or remotely via debuginfod. The functionality was refactored out of existing code in the Symboliize library. Existing utilities were refactored to use this library. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D132504
2022-08-24Add MachO MH_FILESET support to objdumpPeter Cooper1-0/+1
https://reviews.llvm.org/D131909
2022-06-01[Binary] Promote OffloadBinary to inherit from BinaryJoseph Huber1-0/+1
We use the `OffloadBinary` to create binary images of offloading files and their corresonding metadata. This patch changes this to inherit from the base `Binary` class. This allows us to create and insepect these more generically. This patch includes all the necessary glue to implement this as a new binary format, along with added the magic bytes we use to distinguish the offloading binary to the `file_magic` implementation. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D126812
2022-05-02[NFC] Add missing switch casesChris Bieneman1-0/+1
This silences warnings encountered on some bots.
2022-03-17[dsymutil] Apply relocations present in Swift reflection sectionsAugusto Noronha1-0/+9
The strippable Swift reflection sections contain subtractor relocations that need to be applied. There are two situations we need to support. 1) Both symbols used in the relocation come from the .o file (for example, one symbol lives in __swift5_fieldmd and the second in __swift5_reflstr). 2) One symbol comes from th .o file and the second from the main binary (for example, __swift5_fieldmd and __swift5_typeref). Differential Revision: https://reviews.llvm.org/D120574
2022-03-14[CUDA] Add CUDA fatbinary magicJoseph Huber1-0/+1
Nvidia uses fatbinaries to bundle all of their device code. This patch adds the magic number "0x50ed55ba" used in their propeitary format to the list of magic identifies. This is technically undocumented and could unlikely be changed by Nvidia in the future. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D120932
2022-03-12Cleanup includes: DebugInfo & CodeGenserge-sans-paille1-1/+0
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121332
2022-02-10Cleanup LLVMObject headersserge-sans-paille1-2/+2
Most notably, llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h llvm/Object/TapiUniversal.h no longer includes llvm/Object/TapiFile.h llvm-project preprocessed size: before: 1068185081 after: 1068324320 Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119457
2021-10-22Support: Use Expected<T>::moveInto() in a few placesDuncan P. N. Exon Smith1-7/+8
These are some usage examples for `Expected<T>::moveInto()`. Differential Revision: https://reviews.llvm.org/D112280
2021-07-20[SystemZ][z/OS] Add GOFF support to file magic identificationAnirudh Prasad1-0/+1
- This patch adds in the GOFF format to the file magic identification logic in LLVM - Currently, for the object file support, GOFF is marked as having as an error - However, this is only temporary until https://reviews.llvm.org/D98437 is merged in Reviewed By: abhina.sreeskantharajan Differential Revision: https://reviews.llvm.org/D105993
2021-05-26[NFC][object] Change the input parameter of the method isDebugSection.Esme-Yi1-3/+1
Summary: This is a NFC patch to change the input parameter of the method SectionRef::isDebugSection(), by replacing the StringRef SectionName with DataRefImpl Sec. This allows us to determine if a section is debug type in more ways than just by section name. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D102601
2020-11-09Recommit: [llvm-readelf/obj] - Allow dumping of ELF header even if some ↵Georgii Rymar1-2/+3
elements are corrupt. This is recommit for D90903 with fixes for BB: 1) Used std::move<> when returning Expected<> (http://lab.llvm.org:8011/#/builders/112/builds/913) 2) Fixed the name of temporarily file in the file-headers.test (http://lab.llvm.org:8011/#/builders/36/builds/1269) (a local old temporarily file was used before) For creating `ELFObjectFile` instances we have the factory method `ELFObjectFile<ELFT>::create(MemoryBufferRef Object)`. The problem of this method is that it scans the section header to locate some sections. When a file is truncated or has broken fields in the ELF header, this approach does not allow us to create the `ELFObjectFile` and dump the ELF header. This is https://bugs.llvm.org/show_bug.cgi?id=40804 This patch suggests a solution - it allows to delay scaning sections in the `ELFObjectFile<ELFT>::create`. It now allows user code to call an object initialization (`initContent()`) later. With that it is possible, for example, for dumpers just to dump the file header and exit. By default initialization is still performed as before, what helps to keep the logic of existent callers untouched. I've experimented with different approaches when worked on this patch. I think this approach is better than doing initialization of sections (i.e. scan of them) on demand, because normally users of `ELFObjectFile` API expect to work with a valid object. In most cases when a section header table can't be read (because of an error), we don't have to continue to work with object. So we probably don't need to implement a more complex API. Differential revision: https://reviews.llvm.org/D90903
2020-11-09Revert "[llvm-readelf/obj] - Allow dumping of ELF header even if some ↵Georgii Rymar1-3/+2
elements are corrupt." This reverts commit ea8a0b8b29eb08d3f0f6ac40942a2d8e98ab57ee. It broke BBots. http://lab.llvm.org:8011/#/builders/14/builds/1439 http://lab.llvm.org:8011/#/builders/112/builds/913
2020-11-09[llvm-readelf/obj] - Allow dumping of ELF header even if some elements are ↵Georgii Rymar1-2/+3
corrupt. For creating `ELFObjectFile` instances we have the factory method `ELFObjectFile<ELFT>::create(MemoryBufferRef Object)`. The problem of this method is that it scans the section header to locate some sections. When a file is truncated or has broken fields in the ELF header, this approach does not allow us to create the `ELFObjectFile` and dump the ELF header. This is https://bugs.llvm.org/show_bug.cgi?id=40804 This patch suggests a solution - it allows to delay scaning sections in the `ELFObjectFile<ELFT>::create`. It now allows user code to call an object initialization (`initContent()`) later. With that it is possible, for example, for dumpers just to dump the file header and exit. By default initialization is still performed as before, what helps to keep the logic of existent callers untouched. I've experimented with different approaches when worked on this patch. I think this approach is better than doing initialization of sections (i.e. scan of them) on demand, because normally users of `ELFObjectFile` API expect to work with a valid object. In most cases when a section header table can't be read (because of an error), we don't have to continue to work with object. So we probably don't need to implement a more complex API. Differential revision: https://reviews.llvm.org/D90903
2020-05-02[Object] Change ObjectFile::getSymbolValue() return type to Expected<uint64_t>Xing GUO1-3/+3
Summary: In D77860, we have changed `getSymbolFlags()` return type to `Expected<uint32_t>`. This change helps bubble the error further up the stack. Reviewers: jhenderson, grimar, JDevlieghere, MaskRay Reviewed By: jhenderson Subscribers: hiraditya, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79075
2020-04-18[Object] Change uint32_t getSymbolFlags() to Expected<uint32_t> ↵vgxbj1-5/+8
getSymbolFlags(). This change enables getSymbolFlags() to return errors which benefit error reporting in clients. Differential Revision: https://reviews.llvm.org/D77860
2020-04-02[Object] Add the method for checking if a section is a debug sectionDjordje Todorovic1-0/+4
Different file formats have different naming style for the debug sections. The method is implemented for ELF, COFF and Mach-O formats. Differential Revision: https://reviews.llvm.org/D76276
2020-03-31[Object] Update ObjectFile::makeTriple for XCOFFHubert Tong1-4/+7
Summary: When we encounter an XCOFF file, reflect that in the triple information. In addition to knowing the object file format, we know that the associated OS is AIX. This means that we can expect that there is no output difference in the processing of an XCOFF32 input file between cases where the triple is left unspecified by the user and cases where the user specifies `--triple powerpc-ibm-aix` explicitly. Reviewers: jhenderson, sfertile, jasonliu, daltenty Reviewed By: jasonliu Subscribers: wuzish, nemanjai, hiraditya, MaskRay, rupprecht, steven.zhang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77025
2020-02-10Revert "Remove redundant "std::move"s in return statements"Bill Wendling1-1/+1
The build failed with error: call to deleted constructor of 'llvm::Error' errors. This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
2020-02-10Remove redundant "std::move"s in return statementsBill Wendling1-1/+1
2019-11-19Add operator<< for object::SectionedAddressPavel Labath1-0/+7
The main motivation for this is better failure messages in unit tests. Split off from D70394.
2019-10-21[llvm/Object] - Make ELFObjectFile::getRelocatedSection return ↵George Rimar1-1/+2
Expected<section_iterator> It returns just a section_iterator currently and have a report_fatal_error call inside. This change adds a way to return errors and handle them on caller sides. The patch also changes/improves current users and adds test cases. Differential revision: https://reviews.llvm.org/D69167 llvm-svn: 375408
2019-10-01ObjectFile makeTriple - silence static analyzer dyn_cast<COFFObjectFile> ↵Simon Pilgrim1-1/+1
null dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast<COFFObjectFile> directly and if not assert will fire for us. llvm-svn: 373324
2019-09-02Recommit r370661 "[llvm-nm] - Add a test case for case when we dump a symbol ↵George Rimar1-1/+3
that belongs to a section with a broken sh_name." Fix: add a 'consumeError()' call to ObjectFile.cpp. This error was never checked. Original commit message: It adds a test case for a problem fixed by D66976 <https://reviews.llvm.org/D66976>. It was introduced by me in D66089 <https://reviews.llvm.org/D66089>. The error reported was never consumed because of a wrong variable name used, so it could fail when LLVM_ENABLE_ABI_BREAKING_CHECKS is used. Differential revision: https://reviews.llvm.org/D67002 llvm-svn: 370669
2019-08-21[BinaryFormat] Teach identify_magic about Tapi files.Cyndy Ishida1-0/+2
Summary: Tapi files are YAML files that start with the !tapi tag. The only execption are TBD v1 files, which don't have a tag. In that case we have to scan a little further and check if the first key "archs" exists. This is the first patch in a series of patches to add libObject support for text-based dynamic library (.tbd) files. This patch is practically exactly the same as D37820, that was never pushed to master, and is needed for future commits related to reading tbd files for llvm-nm Reviewers: ributzka, steven_wu, bollu, espindola, jfb, shafik, jdoerfert Reviewed By: steven_wu Subscribers: dexonsmith, llvm-commits Tags: #llvm, #clang, #sanitizers, #lldb, #libc, #openmp Differential Revision: https://reviews.llvm.org/D66149 llvm-svn: 369579
2019-07-09[Object][XCOFF] Add support for 64-bit file header and section header dumping.Sean Fertile1-1/+3
Adds a readobj dumper for 32-bit and 64-bit section header tables, and extend support for the file-header dumping to include 64-bit object files. Also refactors the binary file parsing to be done in a helper function in an attempt to cleanup error handeling. Differential Revision: https://reviews.llvm.org/D63843 llvm-svn: 365524
2019-05-10[Object] Change SymbolicFile::printSymbolName to use ErrorFangrui Song1-4/+3
llvm-svn: 360414
2019-05-02[Object] Change getSectionName() to return Expected<StringRef>Fangrui Song1-3/+2
Summary: It currently receives an output parameter and returns std::error_code. Expected<StringRef> fits for this purpose perfectly. Differential Revision: https://reviews.llvm.org/D61421 llvm-svn: 359774
2019-04-04[XCOFF] Add functionality for parsing AIX XCOFF object file headersHubert Tong1-0/+2
Summary: 1. Add functionality for parsing AIX XCOFF object files headers. 2. Only support 32-bit AIX XCOFF object files in this patch. 3. Print out the AIX XCOFF object file header in YAML format. Reviewers: sfertile, hubert.reinterpretcast, jasonliu, mstorsjo, zturner, rnk Reviewed By: sfertile, hubert.reinterpretcast Subscribers: jsji, mgorny, hiraditya, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59419 Patch by Digger Lin llvm-svn: 357663
2019-03-21[Object] Add basic minidump supportPavel Labath1-0/+1
Summary: This patch adds basic support for reading minidump files. It contains the definitions of various important minidump data structures (header, stream directory), and of one minidump stream (SystemInfo). The ability to read other streams will be added in follow-up patches. However, all streams can be read even now as raw data, which means lldb's minidump support (where this code is taken from) can be immediately rebased on top of this patch as soon as it lands. As we don't have any support for generating minidump files (yet), this tests the code via unit tests with some small handcrafted binaries in the form of c char arrays. Reviewers: Bigcheese, jhenderson, zturner Subscribers: srhines, dschuff, mgorny, fedor.sergeev, lemo, clayborg, JDevlieghere, aprantl, lldb-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59291 llvm-svn: 356652
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-12-13[llvm-size][libobject] Add explicit "inTextSegment" methods similar to ↵Jordan Rupprecht1-0/+8
"isText" section methods to calculate size correctly. Summary: llvm-size uses "isText()" etc. which seem to indicate whether the section contains code-like things, not whether or not it will actually go in the text segment when in a fully linked executable. The unit test added (elf-sizes.test) shows some types of sections that cause discrepencies versus the GNU size tool. llvm-size is not correctly reporting sizes of things mapping to text/data segments, at least for ELF files. This fixes pr38723. Reviewers: echristo, Bigcheese, MaskRay Reviewed By: MaskRay Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54369 llvm-svn: 349074
2018-03-07Update a few switch statements to handle file_magic::pdb.Zachary Turner1-0/+1
This fixes a couple of warnings. llvm-svn: 326927