diff options
author | George Rimar <grimar@accesssoftek.com> | 2016-03-03 07:49:35 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2016-03-03 07:49:35 +0000 |
commit | 4cfe572932ddb35dc91d4c241e41205543479b17 (patch) | |
tree | d0e5894145383d376c05a9cf97ac95f16f97e97b /lld/ELF/InputFiles.cpp | |
parent | a64c8233b87eb26e9677faf5afe43e72a0ca1079 (diff) | |
download | bcm5719-llvm-4cfe572932ddb35dc91d4c241e41205543479b17.tar.gz bcm5719-llvm-4cfe572932ddb35dc91d4c241e41205543479b17.zip |
[ELF] - add support for relocations against local symbols when producing relocatable output.
There was a known limitation for -r option:
relocations against local symbols were not supported.
For example rel[a].eh_frame sections contained relocations against sections
and that was not supported for -r before. Patch fixes that.
Differential review: http://reviews.llvm.org/D17813
llvm-svn: 262590
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r-- | lld/ELF/InputFiles.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 393c52b874d..95307e993e1 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -266,7 +266,9 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) { return MipsReginfo; } - if (Name == ".eh_frame") + // We dont need special handling of .eh_frame sections if relocatable + // output was choosen. Proccess them as usual input sections. + if (!Config->Relocatable && Name == ".eh_frame") return new (EHAlloc.Allocate()) EHInputSection<ELFT>(this, &Sec); if (shouldMerge<ELFT>(Sec)) return new (MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec); |