[PATCH] D130221: [ORC] Fix macho section name typo

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 4 18:26:25 PST 2022


dblaikie added a comment.

In D130221#3969515 <https://reviews.llvm.org/D130221#3969515>, @lhames wrote:

>>> So the right answer is to unify `MachOPlatform::isInitializerSection` and `hasMachOInitSection`, and then make sure there's an ORC runtime regression test that exercises each of the special sections.
>>
>> *nod* I'd hope there's some test coverage in the llvm subproject too - even if it's a bit narrower, necessarily. (same way we don't rely on clang or lld tests to test LLVM functionality, but isolate/test it directly too) But yeah, good to have the end-to-end/feature/scenario testing in the runtime testing too.
>
> There are plenty of JIT unit and regression tests in LLVM (and the ORC runtime), but the init symbol stuff sits at the interface between LLVM and the ORC runtime so the best value-for-money testing (of init symbols, and `Platform` implementations more generally) is in regression testing with the ORC runtime. I don't mind the trivial unit test being added, but the regression test coverage is my priority.

*nod* for sure, if I had to pick one, I'd take the runtime feature testing for sure. Appreciate the pointers you've provided on how best to do the unit testing too. Thanks!

>> (aside: Does the MacOS linker really have a special cased list of these sections that gets updated whenever a new one is added? Rather than any kind of section flag/metadata? That's a bit surprising to me (but again, comes back to the 'smart format + dumb linker' V 'dumb format + smart linker' thing between Unix & MacOS, I guess)
>
> Even better: It's a mix of types and special section names. E.g. thread local variable sections are identifiable by type, but language runtime sections just have recognized names. ;)

Delightful! :s


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130221



More information about the llvm-commits mailing list