[lld] r249359 - [ELF2/AArch64] Read the right amount of bytes.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 15:14:15 PDT 2015
On Tue, Oct 6, 2015 at 12:31 PM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> I don't see how yaml can have anything to do with this.
>
> - write16le(Location, read32le(Location) | X);
> + write16le(Location, read16le(Location) | X);
>
> The first one was reading too much. We can't put a relocation at the
> very end of the file with llvm-mc or yaml2obj (the section table is
> there).
>
> I guess you could create one yourself with hexedit, but that really
> doesn't look worth it.
>
> - write64le(Location, read32le(Location) | X);
> + write64le(Location, read64le(Location) | X);
>
> This one was not reading enough. If this was Elf_Rel, you should be
> able to create a test with llvm-mc. But with Elf_Rela, the addend is
> in the relocation structure.
>
> Which brings the question, Davide, are you sure this code should be
> reading the contents? That would be very unusual for a Elf_Rela. Note,
> for example, that X86_64 just calls write* and i386 calls add*.
>
> Cheers,
> Rafael
>
r249628 . Thanks!
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-commits
mailing list