similar to: [LLVMdev] [lld] Linker cannot handle sections with non-unique names

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] [lld] Linker cannot handle sections with non-unique names"

2015 Apr 20
4
[LLVMdev] [lld] Linker cannot handle sections with non-unique names
On Mon, Apr 20, 2015 at 1:44 AM, Shankar Easwaran <shankarke at gmail.com> wrote: > Attached patch fixes the issue. Thanks for the quick fix. The patch LGTM if you add a test case. Unfortunately yaml2obj does not support duplicated section names but we can use a binary input file. -- Simon Atanasyan
2015 Apr 20
2
[LLVMdev] [lld] Linker cannot handle sections with non-unique names
Nothing wrong with going ahead with a temporary measure if the temporary measure is reasonable (besides the discussion if checking in binary files is desirable). Even if you plan to add a test written in YAML, it's better to check in a binary at least for now than checking it in without any tests. On Mon, Apr 20, 2015 at 7:59 AM, Shankar Easwaram <shankarke at gmail.com> wrote: > I
2014 Jan 19
2
[LLVMdev] [lld] Relocation sections format: .rela / .rel
Hi, Now lld writes relocations to the ".rela" sections only. Mips requires to use the "rel" format. So we need to be able to select format and names of relocation section, names of symbols like __rela_iplt_* / __rel_iplt_*, dynamic table tag DT_RELA / DT_REL. My current idea: - Add two virtual functions DefaultLayout::createDynamicRelocationTable() and
2015 Feb 09
2
[LLVMdev] [lld] Representation of lld::Reference with a fake target
Hi, The round trip passes just tries to load a *complete* object file in YAML/Native format back. The internal state should be the complete object file in native/yaml format. If some state is not recorded and that is really needed in the writer, we should add that to the Atom model. Shankar Easwaran On 2/9/2015 1:29 PM, Rui Ueyama wrote: > I want to bring this again because I think
2015 Feb 09
2
[LLVMdev] [lld] Representation of lld::Reference with a fake target
A bit off topic: ARM Group relocations define a logical set of consequent instructions to be relocated to form one single address. For such relocations a 1 to 1 relation is also met, so no need of special processing in applyRelocation. Concerning native format: it also introduced unneeded code complexity to me when I wanted to set calculated relocation addend back into the Reference object in the
2015 Feb 07
2
[LLVMdev] [lld] Representation of lld::Reference with a fake target
We are modeling target specific functionally using references, Doesn't your idea defeat the purpose of the atom model? Atoms are mostly target neutral and yaml/native format represents just an atom. Having a derived class for atoms will have a impact on the testing method with lld IMO. We could continue to model using references in my opinion and add some meta data information in the atom
2014 Mar 06
2
[LLVMdev] [lld] Relocation reading refactoring
Hi Shankar, I almost implement ELFRelocationReader but still not completely sure that this is a right direction. Suppose somebody wants to override creation 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
2015 Feb 07
2
[LLVMdev] [lld] Representation of lld::Reference with a fake target
Not all input files have to be able to represented in YAML/Native format. There are many unrealistic use cases there. No one wants to write an executable file in Native because there's no operating system that can run that file. So is YAML. So is the combination of .so file and Native/YAML unless we have an operating system whose loader is able to loads a YAML .so file. We might want to write
2016 Feb 08
3
[LLD] Incorrect comparision of pointers to function defined in DSO
Hi, It looks like I have found a bug in LLD. Suppose DSO defines a global variable 'data' and initializes it by the address of function 'set_data' defined in the same DSO. If an executable file (linked by LLD) gets address of the '&set_data' function and compares it with a value stored in the 'data' variable it gets different result. If the executable is linked
2016 Feb 08
2
[LLD] Incorrect comparision of pointers to function defined in DSO
Yes, I had just reduced it too. I am pretty sure this was implemented at some point. Taking a look. Cheers, Rafael On 8 February 2016 at 17:52, Sean Silva <chisophugis at gmail.com> wrote: > Sounds like it is related to this: > > http://www.airs.com/blog/archives/42 > """ > > The fact that C permits taking the address of a function introduces an >
2014 Apr 11
2
[LLVMdev] How to use the LLD linker to link llvm/clang/lld?
Hi, If I understand the phrase "lld can self host on x86-64 Linux" from the LLD home page properly, we can link llvm/clang/lld using lld itself. How that can be done? Are there any ways to tell the Clang driver to use the LLD or the only approach is to run the LLD explicitly "by hand" with a large set of arguments? -- Simon
2015 Jun 15
2
[LLVMdev] [lld] How do I prevent .note sections from being eliminated?
On Sat, Jun 13, 2015 at 01:08:50PM +0300, Simon Atanasyan wrote: > Hi, > > If you need to control content of output .note section, take a look at > ARMExidxSection, MipsReginfoSection, MipsOptionsSection classes. If > you need to copy sections from input to output, use SDataSection (from > Hexagon) as a reference point. > Hi Simon, Thanks for the reply. I have a few more
2015 Feb 07
2
[LLVMdev] [lld] Representation of lld::Reference with a fake target
I think no one is opposing the idea of reading and writing YAML. The problem here is that why we need to force all developers to write code to serialize intermediate data in the middle of link, which no one except the round-trip passes needs. On Fri, Feb 6, 2015 at 6:41 PM, Shankar Easwaram <shankarke at gmail.com> wrote: > Doing it for every input file is not useful as some of the
2015 Jun 05
3
[LLVMdev] Modeling ELF linker with lld/Chunks.
Hi All, I have a design question of how your linker would be suitable for modeling ELF semantics. The ELF linker needs the functionality of reading relocations ahead of symbol resolution for the following usecases :- - Add linker defined symbols if there is a relocation to the symbol (Examples are : defsym, PROVIDE) - Dont halt the linker operation if there are undefined symbols but they are
2016 Nov 29
2
[LLD] Writing thunks before the corresponding section
Hi, Sorry for delay with reply. It looks like now thunks can be implemented as a synthetic sections. In that case we give flexible solution and will be able to put thunks before/after related sections, using different alignment etc. As far as I know BFD linker uses the same approach at least for MIPS thunks. I will try to implement this idea. On Thu, Sep 8, 2016 at 1:44 AM, Rui Ueyama <ruiu
2016 Nov 30
0
[LLD] Writing thunks before the corresponding section
Sure. One thing I want to remind you is that there is a place in Writer.cpp where we assume all synthetic sections were appended to end of Sections list. Look for `llvm::reverse`. If you add synthetic section thunks right before/after non-synthetic sections, you also want to change that. On Tue, Nov 29, 2016 at 1:18 PM, Simon Atanasyan <simon at atanasyan.com> wrote: > Hi, > >
2014 Nov 11
6
[LLVMdev] [lld][ELF] How to transfer st_other field value from input to output file
I had a similar issue with arm vs thumb in mach-o. Each function’s thumbness is marked in its symbol table entry. But it is even worse, a function could change encoding in the middle (only hand coded assembly could do this). My solution was to add a new Reference Kind for mach-o which is the current instruction encoding. The offsetInAtom() is the offset where the encoding kind changes.
2016 Sep 07
5
[LLD] Writing thunks before the corresponding section
Hi, MIPS LA25 thunk is used to call PIC function from non-PIC code. Usually it contains three instructions: lui $25, %hi(func) addiu $25, $25, %lo(func) j func We can write such thunk in an arbitrary place of the generated file. But if a PIC function requires the thunk is the first routine in a section, we can optimize the code and escape jump instruction. To do so we just write the
2014 Nov 11
6
[LLVMdev] [lld][ELF] How to transfer st_other field value from input to output file
On Nov 11, 2014, at 11:54 AM, Rui Ueyama <ruiu at google.com> wrote: > This falls into the usual topic that whether or not we should have a generic map attached to an atom. You used a reference as an alternative for the map in this case but the basic idea is the same. > > Although using a reference would be practical, it still feels a hack to me. It's awkward at least. Why
2016 Apr 04
2
[LLD][ELF] Dynamic relocations list depends on the input files order
Hi, For MIPS it is possible that output executable file contains both GOT entry and R_MIPS_COPY or R_MIPS_REL32 relocation for the same target symbol. If LLD processes the relocation requires GOT entry before the relocation requires COPY dynamic relocation, it generates the correct output. If the order is reversed, LLD emits COPY dynamic relocation only and does not generate a GOT entry (or shows