Go to file
Fangrui Song 8fbe81fb29 [ELF][RISCV] Assign st_shndx of __global_pointer$ to 1 if .sdata does not exist
This essentially reverts the code change of D63132 and switches to a simpler approach.

In an executable/shared object, st_shndx of a symbol can be:

1) SHN_UNDEF: undefined symbol (or canonical PLT)
2) SHN_ABS: absolute symbol
3) any other value (usually a regular section index) represents a relative symbol.
  The actual value does not matter.

Many ld.so (musl, all archs except MIPS of FreeBSD rtld-elf) even treat 2) and 3)
the same. If .sdata does not exist, it does not matter what value/section
__global_pointer$ has, as long as it is relative (otherwise there will be a pedantic
lld error. See D63132). Just set the st_shndx arbitrarily to 1.

Dummy st_shndx=1 may be used by __rela_iplt_start, linker-script-defined symbols outside a section, __dso_handle, etc.

Reviewed By: ruiu

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

llvm-svn: 370172
2019-08-28 09:01:03 +00:00
clang Fixup build of clang-interpreter example after change in r370122. 2019-08-28 02:13:24 +00:00
clang-tools-extra [clang-doc] Use llvm::createStringError and canonicalize error messages 2019-08-28 02:56:03 +00:00
compiler-rt [compiler-rt] Don't use libcxx if it's not enabled by LLVM_ENABLE_PROJECTS 2019-08-28 02:41:14 +00:00
debuginfo-tests Make nrvo-string test more robust. 2019-06-27 20:38:37 +00:00
libclc Revert "Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC" 2019-08-05 17:23:23 +00:00
libcxx [libc++] Add yet another test for inverted character classes 2019-08-27 20:39:10 +00:00
libcxxabi Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directory 2019-08-19 23:51:26 +00:00
libunwind [runtimes] Don't depend on libpthread on Android 2019-07-22 20:41:03 +00:00
lld [ELF][RISCV] Assign st_shndx of __global_pointer$ to 1 if .sdata does not exist 2019-08-28 09:01:03 +00:00
lldb Update name of objc runtime SPI function we call for class names. 2019-08-28 02:14:07 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm [ARM][ParallelDSP] Change search for muls 2019-08-28 08:51:13 +00:00
openmp [libomptarget] Refactor syncwarp macro to inline function 2019-08-28 02:02:53 +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 [ScopBuilder] Simplify main statement flag in buildEqivClassBlockStmts. NFC. 2019-08-26 21:31:47 +00:00
pstl [pstl] Allow customizing whether per-TU insulation is provided 2019-08-13 12:49:00 +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 Change /build to /build* in top-level .gitignore. 2019-08-02 02:14:08 +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.