1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
Go to file
Fangrui Song 4ae6ca1cf2 [llvm-objcopy] -O binary: skip empty sections
After SHF_ALLOC sections are ordered by LMA:

* If initial sections are empty, GNU objcopy skips their contents while we
  emit leading zeros. (binary-paddr.test %t4)
* If trailing sections are empty, GNU objcopy skips their contents while we
  emit trailing zeros. (binary-paddr.test %t5)

This patch matches GNU objcopy's behavior. Linkers don't keep p_memsz
PT_LOAD segments. Such empty sections would not have a containing
PT_LOAD and `Section::ParentSegment` might be null if linkers fail to
optimize the file offsets (lld D79254).

In particular, without D79254, the arm Linux kernel's multi_v5_defconfig
depends on this behavior: in `vmlinux`, an empty .text_itcm is mapped at
a very high address (0xfffe0000) but the kernel does not expect
`objcopy -O binary` to create a very large `arch/arm/boot/Image`
(0xfffe0000-0xc0000000 ~= 1GiB). See https://bugs.llvm.org/show_bug.cgi?id=45632

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D79229
2020-05-01 14:25:37 -07:00
benchmarks
bindings Update go bindings for 2dea3f129878e929e5d1f00b91a622eb1ec8be4e 2020-04-22 19:02:59 +02:00
cmake [CMake] Provide a proper default location for llvm-lit for out-of-tree users on Windows host. 2020-05-01 11:48:30 -07:00
docs [docs][llvm-cxxfilt] Document --no-strip-underscore option 2020-05-01 11:03:06 +01:00
examples [examples] Fix an incomplete comment. 2020-05-01 11:06:41 -07:00
include [SVE] Fix invalid use of VectorType::getNumElements() in PatternMatch 2020-05-01 12:35:08 -07:00
lib [DebugInfo] Update loop metadata in stripNonLineTableDebugInfo 2020-05-01 11:36:05 -07:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes [runtimes] When COMPILER_RT is enabled, consider SANITIZER prefixes 2020-03-11 14:22:20 -07:00
test [llvm-objcopy] -O binary: skip empty sections 2020-05-01 14:25:37 -07:00
tools [llvm-objcopy] -O binary: skip empty sections 2020-05-01 14:25:37 -07:00
unittests [AIX] Skip unsupported ORC JIT RemoteObjectLayerTest on AIX 2020-05-01 17:03:05 -04:00
utils [lit] Don't crash for --time-tests in aborted test run 2020-04-30 18:19:15 -07:00
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitattributes
.gitignore Continue removing llgo. 2020-02-10 10:33:58 -08:00
CMakeLists.txt Revert "Temporarily revert "build: use find_package(Python3) if available"" 2020-04-29 01:38:08 +00:00
CODE_OWNERS.TXT Remove myself from CODE_OWNERS. 2020-02-25 11:59:29 +00:00
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.