[lld] r264863 - Fix handling of addends on i386.

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 06:13:08 PDT 2016


Are you going to implement MipsTargetInfo::getImplicitAddend. I can do
that by myself.

BTW what do you think about moving the `TargetInfo::getImplicitAddend`
to the getAddend() function. In that case interface of getAddend
becomes more complicated but we can abstract from REL/RELA relocation
record format and get correct addend everywhere we need it.

On Wed, Mar 30, 2016 at 3:40 PM, Rafael Espindola via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
> +uint64_t X86TargetInfo::getImplicitAddend(uint8_t *Buf, uint32_t Type) const {
> +  switch (Type) {
> +  default:
> +    return 0;
> +  case R_386_32:
> +  case R_386_GOT32:
> +  case R_386_GOTOFF:
> +  case R_386_GOTPC:
> +  case R_386_PC32:
> +  case R_386_PLT32:
> +    return read32le(Buf);
> +  }
> +}

Simon Atanasyan


More information about the llvm-commits mailing list