Displaying 9 results from an estimated 9 matches for "relocateone".
2015 Nov 21
2
[lld] Hiding original type of GOT related relocations
...tionBase<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` method.
Is it really necessary to hide original relocation type? If a target
has multiple GOT related relocations it might just add more `cases` to
its `relocateOne` method.
[1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf page 4-19
[2] ftp://www.linux-mips.org/pub/linux/mips/doc/...
2016 Feb 03
2
lld dynamic relocation creation issue
...p sequence is:
- Write::run
\_ Write::createSections
\_ Write::scanRelocs
\_ Write::addReloc // Dynamic Relocation creation
\_ Write::writeSections
\_ OutputSectionBase::writeTo
\_ InputSection::writeTo
\_ InputSection::relocate
\_ TargetInfo::relocateOne
The problem is only at TargetInfo::relocate the target (aarch64) will see
that the relocation is a R_AARCH64_ABS64 one and thus will need to create
a dynamic R_AARCH64_RELATIVE relocation.
Also from comments at ELF/Writer.cpp:243 I noted that scanRelocs is done
early as a design choice. So I a...
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
...ement each of these methods somewhere in the
`InputSectionBase` class under `if (MIPS)` statements.
Any opinions about the best method / approach?
== Q2
R_MIPS_HI16 and R_MIPS_LO16 relocations perform a special calculation
if a target symbol's name is `_gp_disp` [2]. AFAIK now in the target
`relocateOne` method there is no chance to get the traget symbol name.
Is it okay to pass the target symbol index and provide
`MipsTargetInfo` access to the symbol table of the processing input
file?
[1] ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf page 4-18
[2] ftp://www.linux-mips.org/pub/linu...
2019 Mar 13
2
Need help implementing relocations
Tim,
Thanks for the explanation.
"it tells the linker to insert the address of
date when converting this .o file into a final executable."
Which utility do you use to convert .o to .elf and insert the address of 'date'? llvm-objcopy?
________________________________
From: Tim Northover <t.p.northover at gmail.com>
Sent: Wednesday, March 13, 2019 3:20 AM
To: Josh Sharp
Cc:
2017 Sep 18
1
Do I need to modify the AddrLoc of LLD for ARC target?
...(PC, 4) where Align rounds down to nearest 4-byte boundary. The
>> linker needs to account for this when resolving the relocation
>> R_ARM_THM_CALL.
>>
>> To handle the alignment difference for this one special case in lld I
>> accounted for the alignment difference in relocateOne. You may be able
>> to use a similar method for Arc rather than writing modifyARCAddrLoc.
>> Again I know nothing about Arc so you'll need to look at the
>> Architecture reference manual to understand what the instruction the
>> relocation applies to works.
>>
>...
2016 Dec 14
2
LLD status update and performance chart
...n LLVM and the static
> "linker as a library". This has been brought up in this thread, if
> you look at the details, the argument is not as strong as the
> high-level software engineering spidey sense might initially
> suggest.
Alright, let's be specific. PPC64TargetInfo::relocateOne in tools/lld/ELF/Target.cpp has this:
switch (Type) {
case R_PPC64_ADDR14: {
checkAlignment<4>(Val, Type);
// Preserve the AA/LK bits in the branch instruction
uint8_t AALK = Loc[3];
write16be(Loc + 2, (AALK & 3) | (Val & 0xfffc));
break;
}
case R_PPC64_ADDR16:
checkInt<...
2016 Dec 14
0
LLD status update and performance chart
...M and the static "linker as
> a library". This has been brought up in this thread, if you look at the
> details, the argument is not as strong as the high-level software
> engineering spidey sense might initially suggest.
>
> Alright, let's be specific. PPC64TargetInfo::relocateOne in
> tools/lld/ELF/Target.cpp has this:
>
> switch (Type) {
> case R_PPC64_ADDR14: {
> checkAlignment<4>(Val, Type);
> // Preserve the AA/LK bits in the branch instruction
> uint8_t AALK = Loc[3];
> write16be(Loc + 2, (AALK & 3) | (Val & 0xf...
2017 Sep 19
1
Do I need to modify the AddrLoc of LLD for ARC target?
...st 4-byte boundary. The
>>>> linker needs to account for this when resolving the relocation
>>>> R_ARM_THM_CALL.
>>>>
>>>> To handle the alignment difference for this one special case in lld I
>>>> accounted for the alignment difference in relocateOne. You may be able
>>>> to use a similar method for Arc rather than writing modifyARCAddrLoc.
>>>> Again I know nothing about Arc so you'll need to look at the
>>>> Architecture reference manual to understand what the instruction the
>>>> relocation...
2016 Dec 14
0
LLD status update and performance chart
On Tue, Dec 13, 2016 at 12:08 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Tue, Dec 13, 2016 at 12:01 PM, Mehdi Amini <mehdi.amini at apple.com>
> wrote:
>
>>
>> On Dec 13, 2016, at 11:51 AM, Rui Ueyama <ruiu at google.com> wrote:
>>
>> On Tue, Dec 13, 2016 at 11:37 AM, Mehdi Amini <mehdi.amini at apple.com>
>> wrote:
>>