Displaying 4 results from an estimated 4 matches for "outsecoff".
2016 Jun 21
2
[LLD] thunk implementation correctness depends on order of input section.
...eclared 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);
IS->OutSecOff = Off;
scanRelocations(*IS);
// Now that scan relocs possibly changed the size, update the offset.
Sec->setSize(Off + S->getSize());...
2017 Sep 19
1
Do I need to modify the AddrLoc of LLD for ARC target?
...t64_t M = 0;
+ if (Type == R_ARC_32_PCREL || Type == R_ARC_PC32 ||
+ Type == R_ARC_GOTPC32 || Type == R_ARC_GOTPC)
+ M = 4; // bitsize >= 32 ? 4 : 0
+ AddrLoc = (getOutputSection()->Addr /* output_section->vma */ +
+ cast<InputSection>(this)->OutSecOff /* output_offset */ +
+ Offset /* reloc_offset */ - M) & ~0x3;
+ }
uint64_t TargetVA = SignExtend64(
getRelocTargetVA(Type, Rel.Addend, AddrLoc, *Rel.Sym, Expr), Bits);
Looking at your calculation for AddrLoc, it seems like your
calculation doesn't match the o...
2017 Sep 18
1
Do I need to modify the AddrLoc of LLD for ARC target?
...>>>
>>> I implemented the MOD P for ARC:
>>>
>>> static void modifyARCAddrLoc(uint64_t &AddrLoc, const uint16_t EMachine,
>>> RelExpr Expr, uint32_t Type, uint64_t VMA,
>>> uint64_t OutSecOff, uint64_t RelOff) {
>>> if (EMachine != EM_ARC_COMPACT || EMachine != EM_ARC_COMPACT2 ||
>>> Expr != R_PC || Expr != R_GOT_PC) {
>>> return;
>>> }
>>>
>>> uint64_t M = 0;
>>> if (Type == R_ARC_32_PCREL || Type == R_ARC_P...
2017 Sep 14
4
Do I need to modify the AddrLoc of LLD for ARC target?
Hello Leslie,
I think we are going to need to know a bit more about the ELF ABI for
what looks like the ArcCompact before we can help you.
LLD's calculation of P (the place to be relocated) is as it is in the
generic ELF specification. The Rel.Offset corresponds to the ELF
r_offset field. This is covered by: "For a relocatable file, the value
is the byte offset from the beginning of the