[PATCH] D90722: [RTDYLD] support absolute relocations where needed

Jameson Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 11:31:00 PST 2020


vtjnash added a comment.

> If it's too fiddly I don't mind this going in without a test case right now -- I think extra cycles would be just as well spent bringing up / testing JITLink for ELF. We should make sure we don't replicate this issue by using empty strings as sentinels there.

Yeah, I'm thinking this is not worth chasing too much with tests, and focusing instead on JITLink. I was mostly interested in getting this working so I can start using ORCv2 and then incrementally testing the frontiers (ie JITLink). In this case, RTDyld seemed to be thinking it was a R_X86_64_32 relocation, so the main goal is to just avoid loading that section (which will abort) or doing anything too regrettable (like trying to record the address of it) as we examine the relocations list.

(Aside on this detail: I'm not sure precisely how this DWARF relocation is supposed to be represented in the struct here, but I vaguely know it should be a 32-bit section-relative symbol that's computed statically, so that no relocation needs to actually happen dynamically, regardless of how the sections eventually get laid out in memory. The debugger or unwinder is responsible for computing the real address on the fly.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90722/new/

https://reviews.llvm.org/D90722



More information about the llvm-commits mailing list