[PATCH] D99078: [LLD][WIP] Implement /guard:[no]ehcont

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 13:56:39 PDT 2021


rnk added a comment.

In D99078#2644001 <https://reviews.llvm.org/D99078#2644001>, @pengfei wrote:

> Hi @rnk , I'm implementing EHCont guard in LLD referring to your longjmp patch. Currently the binary's EHCont table always be null. I guess it results from I haven't told lld where's the place it should put the EHCont table in the load config table.
> But I didn't find any related code in longjmp patch. Could you point me where the code is? Or I misunderstood something?

The CRT is actually responsible for providing a struct defining the load configuration. You can see in the LLD gfids tests that they all have a blob like this:

          .section .rdata,"dr"
  .globl _load_config_used
  _load_config_used:
          .long 256
          .fill 124, 1, 0
          .quad __guard_fids_table
          .quad __guard_fids_count
          .long __guard_flags
          .fill 128, 1, 0

To add ehcont tests, you will need to provide a similar load config that llvm-readobj can parse. Hopefully that answers your question.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99078



More information about the llvm-commits mailing list