Go to file
Fangrui Song 249fde8583 [ELF][ARM][AARCH64][MIPS][PPC] Simplify the logic to create R_*_RELATIVE for absolute relocation types in writable sections
Summary:
Our rule to create R_*_RELATIVE for absolute relocation types were
loose. D63121 made it stricter but it failed to create R_*_RELATIVE for
R_ARM_TARGET1 and R_PPC64_TOC. rLLD363236 worked around that by
reinstating the original behavior for ARM and PPC64.

This patch is an attempt to simplify the logic.

Note, in ld.bfd, R_ARM_TARGET2 --target2=abs also creates
R_ARM_RELATIVE. This seems a very uncommon scenario (moreover,
--target2=got-rel is the default), so I do not implement any logic
related to it.

Also, delete R_AARCH64_ABS32 from AArch64::getDynRel. We don't have
working ILP32 support yet. Allowing it would create an incorrect
R_AARCH64_RELATIVE.

For MIPS, the (if SymbolRel, then RelativeRel) code is to keep its
behavior unchanged.

Note, in ppc64-abs64-dyn.s, R_PPC64_TOC gets an incorrect addend because
computeAddend() doesn't compute the correct address. We seem to have the
wrong behavior for a long time. The important thing seems that a dynamic
relocation R_PPC64_TOC should not be created as the dynamic loader will
error R_PPC64_TOC is not supported.

Reviewers: atanasyan, grimar, peter.smith, ruiu, sfertile, espindola

Reviewed By: ruiu

Differential Revision: https://reviews.llvm.org/D63383

llvm-svn: 363928
2019-06-20 14:00:08 +00:00
clang Dump more information about construct expressions (resolved and unresolved) when dumping the AST to JSON. 2019-06-20 13:19:41 +00:00
clang-tools-extra [clangd] Include the diagnostics's code when comparing diagnostics 2019-06-19 23:11:02 +00:00
compiler-rt [libFuzzer] ensure that DFT and autofocus works for C++ (mangled) functions 2019-06-20 01:48:45 +00:00
debuginfo-tests llgdb.py: Make sure to clean up the debugger on exit. 2019-06-17 20:06:34 +00:00
libclc travis: Add LLVM-8 build 2019-03-27 21:28:31 +00:00
libcxx [NFC][libc++] Remove stray semi-colon after function definition 2019-06-19 16:33:28 +00:00
libcxxabi [demangle] Special case clang's creative mangling of __uuidof expressions. 2019-06-18 23:34:09 +00:00
libunwind [libunwind][AArch64] Fix libunwind::Registers_arm64::jumpto 2019-06-17 11:00:21 +00:00
lld [ELF][ARM][AARCH64][MIPS][PPC] Simplify the logic to create R_*_RELATIVE for absolute relocation types in writable sections 2019-06-20 14:00:08 +00:00
lldb [lldb] [Process/NetBSD] Remove unnecessary register buffer abstraction 2019-06-20 12:44:37 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [SLP][X86] Add lookahead reordering tests from D60897 2019-06-20 12:52:58 +00:00
openmp [OpenMP][libomptarget] Add support for declare target to clause under unified memory 2019-06-19 15:48:10 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [test] Add wrap flags after D61934. 2019-06-17 19:17:07 +00:00
pstl [pstl] Remove warnings in tests and headers 2019-06-19 20:15:50 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Add a reduced copy of the llvm .gitignore 2019-04-09 00:52:49 +00:00
README.md

README.md

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.