summaryrefslogtreecommitdiff
path: root/AK/BinaryBufferWriter.h
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2023-04-22 12:09:00 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-14 13:47:53 +0200
commite2b1f9447cd2fc32670568a7cf3f539e33b81e7a (patch)
tree68203b9b3f97901e3be892063bf5a7532572bdaa /AK/BinaryBufferWriter.h
parentcd45c2d295f638adc73fd0730b7e83c9351449a8 (diff)
downloadserenity-e2b1f9447cd2fc32670568a7cf3f539e33b81e7a.zip
LibELF: Only call IFUNC resolvers after populating the PLT
As IFUNC resolvers may call arbitrary functions though the PLT, they can only be called after the PLT has been populated. This is true of the `[[gnu::target_clones]]` attribute, which makes a call to `__cpu_indicator_init`, which is defined in `libgcc_s.so`, through the PLT. `do_plt_relocation` and `do_direct_relocation` are given a parameter that controls whether IFUNCs are immediately resolved. In the first pass, relocations pointing to IFUNCs are put on a worklist, while all other relocations are performed. Only after non-IFUNC relocations are done and the PLT is set up do we deal with these.
Diffstat (limited to 'AK/BinaryBufferWriter.h')
0 files changed, 0 insertions, 0 deletions