[PATCH] D131309: [ELF] Add ability to get a symbol by name from the hash table section

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 19:00:34 PDT 2022


MaskRay added a comment.

In D131309#3760025 <https://reviews.llvm.org/D131309#3760025>, @jhuber6 wrote:

> In D131309#3760024 <https://reviews.llvm.org/D131309#3760024>, @MaskRay wrote:
>
>> Having the public API may lure users to improperly use it and what it does (DT_HASH) is very different from the practice.
>> I think the DT_HASH code should reside in `libomptarget`
>
> What if we changed the interface to instead search the ELF for the hash section rather than passing it in. Then we would only use the `DT_HASH` section if it is the only one present.

Can you elaborate? When adding a public API, it should be useful. If this is `libomptarget` specific (this DT_HASH case pretty much is), keep it there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131309



More information about the llvm-commits mailing list