[PATCH] D147364: [lld][ELF] Add thunks for relocations R_AVR_LO8_LDI_GS/R_AVR_HI8_LDI_GS

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 17:36:38 PDT 2023


benshi001 created this revision.
benshi001 added a reviewer: MaskRay.
Herald added subscribers: Jim, arichardson, emaste, dylanmckay.
Herald added a project: All.
benshi001 requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
Herald added a project: LLVM.

Relocations R_AVR_LO8_LDI_GS/R_AVR_HI8_LDI_GS (indirect calls 
via function pointers) only covers range 128KB.

These two relocations are directly mapped if in range. But for
function addresses beyond this range, GNU-ld emits trampolines.
And this patch implements thunks for them in lld.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147364

Files:
  lld/ELF/Arch/AVR.cpp
  lld/ELF/Thunks.cpp
  lld/test/ELF/avr-thunk.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147364.510153.patch
Type: text/x-patch
Size: 4489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230401/8d48e031/attachment.bin>


More information about the llvm-commits mailing list