Displaying 20 results from an estimated 44 matches for "elft".
Did you mean:
elf
2017 Nov 13
4
How to objcopy via LLVM toolchain for armv7e-m ELF32LE?
Hi LLVM developers,
As PR35281 mentioned:
$ llvm-objcopy -O binary llvm-cortex-m7.elf llvm-cortex-m7.bin
llvm-objcopy: 'llvm-cortex-m7.elf': The file was not recognized as a
valid object file.
if (ELFObjectFile<ELF64LE> *o =
dyn_cast<ELFObjectFile<ELF64LE>>(&Binary))
https://github.com/llvm-mirror/llvm/blob/master/tools/llvm-objcopy/llvm-objcopy.cpp#L200
2017 Jun 06
3
llvm-objcopy proposal
Fantastic! Thanks for all of the input! I'll be considering all of it going
forward. The plan right now is just to worry about ELF executables and
nothing else. I'm very sympathetic to the "llvm-objtool" change. If
everyone is cool with it I'll change the name in the next CL to
"llvm-objtool".
To start out I implemented a very basic ELF64LE specific bit of code.
2014 Feb 26
2
[LLVMdev] [lld] Relocation reading refactoring
Hi,
Thanks for the explanation. If I understand you properly you suggest
to move relocation parsing to the class with the following interface.
Right?
Who will be user of this class? If it is still only ELFFile class,
what benefits will we get from separation of this logic?
template <class ELFT> class ELFRelocationReader {
public:
ELFRelocationReader(.....);
// Returns all created references.
ReferenceRangeT getAllReferences();
// Returns references for specified section/symbol.
ReferenceRangeT getReferences(StringRef sectionName,
Elf_Sym *sy...
2014 Mar 06
2
[LLVMdev] [lld] Relocation reading refactoring
...eation of the `ELFReference` object from the `Elf_Rela` or `Elf_Rel`
record. Let's consider two implementations A and B:
A:
=====
1. Factor out `ELFReference` creation from
`createDefinedAtomAndAssignRelocations` into a couple of virtual
functions with the following signature:
ELFReference<ELFT> *
createRelocationReference(const Elf_Sym &symbol, const Elf_Rela &rai);
ELFReference<ELFT> *
createRelocationReference(const Elf_Sym &symbol, const Elf_Rel &ri,
ArrayRef<uint8_t> content);
2. Override one or both these methods in the <...
2014 Feb 26
2
[LLVMdev] [lld] Relocation reading refactoring
Hi Shankar,
On Tue, Feb 12, 2013 at 10:46 PM, Shankar Easwaran
<shankare at codeaurora.org> wrote:
> Author: shankare
> Date: Tue Feb 12 12:46:53 2013
> New Revision: 174990
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174990&view=rev
[...]
> ELFDefinedAtom<ELFT> *createDefinedAtomAndAssignRelocations(
> StringRef symbolName, StringRef sectionName, const Elf_Sym *symbol,
> const Elf_Shdr *section, ArrayRef<uint8_t> content) {
> @@ -380,6 +534,11 @@ private:
> (ri->r_offset < symbol->st_value + conten...
2015 Nov 21
2
[lld] Hiding original type of GOT related relocations
...MIPS_CALL16
[1]. R_MIPS_GOT16 is applicable to local and external symbols and
performs a different calculation in each cases [2]. R_MIPS_CALL16 is
applicable to external symbols only and a linker should show an error
if it finds R_MIPS_CALL16 with a local target. Now LLD in the
`InputSectionBase<ELFT>::relocate` methods hides original type of GOT
relocations and always use the result of `Target->getGotRefReloc()`
call. In case of MIPS it is R_MIPS_GOT16. It makes impossible to
perform target symbol type checking and the error generation in the
`MipsTargetInfo<ELFT>::relocateOne` met...
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael,
On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote:
> However, do we need to start with instrumentation? The original paper
> uses sampling with good results and current intel cpus can record every
> branch in a program.
>
> I would propose starting with just an lld patch that reads the call
> graph from a file. The format would be very similar to
2016 Jun 21
2
[LLD] thunk implementation correctness depends on order of input section.
...nk is processed after the InputSection that the thunk is added to.
For reference the important code snippet in Writer.cpp is:
// Scan relocations. This must be done after every symbol is declared so that
// we can correctly decide if a dynamic relocation is needed.
for (OutputSectionBase<ELFT> *Sec : OutputSections) {
Sec->forEachInputSection([&](InputSectionBase<ELFT> *S) {
if (auto *IS = dyn_cast<InputSection<ELFT>>(S)) {
// Set OutSecOff so that scanRelocations can use it.
uintX_t Off = alignTo(Sec->getSize(), S->Alignment);...
2016 Mar 16
2
LLD performance w.r.t. local symbols (and --build-id)
Slowdown by "[ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.?" looks wierd for me. I do not see any reasons for any impact on perfomance by this change.
Good news is that since it was NFC it can easily be reverted. But I think slowdown in results is unrelative with that change and reverting will not give us 2-3% boost back.
Best...
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
On Tue, Feb 21, 2017 at 2:05 PM, Rafael Avila de Espindola via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Carlo Kok <ck at remobjects.com> writes:
>
> > On 2017-02-21 20:33, Rafael Avila de Espindola wrote:
> >>> Input files:
> >>> https://www.dropbox.com/s/8yn3dggx05atn47/binLinux.zip?dl=0
> >>
> >> If you pass --reproduce
2015 Jun 03
3
[LLVMdev] [lld] TBSS wrong size
...nerates a correct output:
>>
>> [17] .tbss NOBITS 0000000000410dec 00000dec
>> 000000000000001c 0000000000000000 WAT 0 0 4
>>
>> My initial idea is that 'lib/ReaderWriter/ELF/SegmentChunks.cpp' /
>> Segment<ELFT>::assignVirtualAddress is setting wrong slice values, however
>> playing with this I could not find a correct logic to handle the TBSS.
>>
>> Any ideas where lld is possible messing the TBSS segments sizes?
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
...lvm-dev/attachments/20170222/6462969a/attachment.html>
-------------- next part --------------
diff --git a/ELF/SyntheticSections.cpp b/ELF/SyntheticSections.cpp
index 19326bc..05fb9e3 100644
--- a/ELF/SyntheticSections.cpp
+++ b/ELF/SyntheticSections.cpp
@@ -1031,6 +1031,7 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) {
// in account 'local' and 'global' GOT entries.
P->r_offset += In<ELFT>::MipsGot->getTlsOffset();
P->setSymbolAndType(Rel.getSymIndex(), Rel.Type, Config->Mips64EL);
+ errs() <...
2019 Jun 24
4
Expected behavior of lld during LTO for global symbols (Attr Internal/Common)
...#39;t contain any symbols. But I don't fully understand what is going
on. I'll try to investigate tomorrow.
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 008a6cd7954..d9deddbf357 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1789,6 +1789,11 @@ template <class ELFT> void
LinkerDriver::link(opt::InputArgList &Args) {
if (!Config->Relocatable)
Symtab->scanVersionScript();
+ // Replace common symbols with regular symbols, so that common
+ // symbols in input object files appear as regular symbols in .bss
+ // in the output.
+ replaceCom...
2015 Jun 02
2
[LLVMdev] [lld] TBSS wrong size
...est tbss segment, not all
from all objects. ld generates a correct output:
[17] .tbss NOBITS 0000000000410dec 00000dec
000000000000001c 0000000000000000 WAT 0 0 4
My initial idea is that 'lib/ReaderWriter/ELF/SegmentChunks.cpp' /
Segment<ELFT>::assignVirtualAddress is setting wrong slice values, however
playing with this I could not find a correct logic to handle the TBSS.
Any ideas where lld is possible messing the TBSS segments sizes?
2017 Jun 15
7
[RFC] Profile guided section layout
...Config->NoUndefinedVersion = Args.hasArg(OPT_no_undefined_version);
Config->Nostdlib = Args.hasArg(OPT_nostdlib);
diff --git a/ELF/InputFiles.cpp b/ELF/InputFiles.cpp
index 902593b..d64c1da 100644
--- a/ELF/InputFiles.cpp
+++ b/ELF/InputFiles.cpp
@@ -527,6 +527,35 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
if (Name == ".eh_frame" && !Config->Relocatable)
return make<EhInputSection>(this, &Sec, Name);
+ // Profile data.
+ if (Name == ".note.llvm.callgraph") {
+ ArrayRef<uint8_t> CallgraphBu...
2016 Apr 27
4
RFC: LLD symbol table redesign
...be made directly using symbol
information, without needing to create a SymbolBody for the symbol. If we
decide to replace the symbol, we placement-new a SymbolBody for the symbol
into Symbol::Body.
A sketch of how the symbol table might implement adding an undefined symbol:
Symbol *SymbolTable<ELFT>::addUndefined(StringRef Name, uint8_t Binding, …)
{
std::pair<Symbol *, bool> P = insert(Name);
if (!P.second) { // symbol already in symbol table
if (auto *L = dyn_cast<Lazy>(P.first->body()))
addFile(L);
return P.first;
}
// symbol previously unseen
new...
2016 Mar 16
2
LLD performance w.r.t. local symbols (and --build-id)
...lvm-project/lld/trunk at 263225
91177308-0d34-0410-b5e6-96231b3b80d8
r263227 ~2-3% slowdown for ScyllaDB
commit 6b96b614d9e0232b106165255148af8909607ec1
Author: George Rimar <grimar at accesssoftek.com>
Date: Fri Mar 11 12:57:52 2016 +0000
[ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk at 263227
91177308-0d34-0410-b5e6-96231b3b80d8
r263228 ~6-7% slowdown for ScyllaDB
commit e5aedbede69d60d90f16395af8d4fa6171a5c46a
Author: Rafael Espindola <rafael.espindola at gmail.com>
Date: Fri Mar 11 13...
2013 Jul 01
4
[LLVMdev] [bikeshed] Anyone have strong feelings about always putting `template <...>` on its own line?
...le to always put `template <...>` on its own line. I think it's a
general code-layout consistency win and avoids some cases where trivial
code changes result in significant formatting differences (see the last
example).
Examples of the current behavior:
--------------
template <class ELFT>
class ELFState {
clang-format's to:
template <class ELFT> class ELFState {
--------------
--------------
template <class T>
static size_t vectorDataSize(const std::vector<T> &Vec) {
clang-format's to:
template <class T> static size_t vectorDataSize(const...
2016 Oct 21
2
LLD: creating linker-generated sections as input sections instead of output sections
> Is anyone already working on it? If not then I can take this task.
Me - not.
George.
2016 Dec 19
2
[lld] Treat .openbsd.randomdata as read-only
...StringRef S = Sec->getName();
return S == ".data.rel.ro" || S == ".ctors" || S == ".dtors" || S == ".jcr" ||
- S == ".eh_frame";
+ S == ".eh_frame" || S == ".openbsd.randomdata";
}
template <class ELFT>