Based on the discussion in https://reviews.llvm.org/D130221 and https://reviews.llvm.org/D139223
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp | ||
---|---|---|
300 | Aside/@lhames - I /think/ maybe this is meant to be detected by flag rather than name? ( https://docs.oracle.com/cd/E19683-01/816-1386/6m7qcobks/index.html "When creating a dynamic object, the link-editor identifies these arrays with the .dynamic tags DT_PREINIT_ARRAY and DT_PREINIT_ARRAYSZ, DT_INIT_ARRAY and DT_INIT_ARRAYSZ, and DT_FINI_ARRAY and DT_FINI_ARRAYSZ accordingly, so that they may be called by the runtime linker." - so maybe these shouldn't be being detected by name, but by these tags? In any case, that could be fixed here separately from this change in review, but something to keep in mind, perhaps. | |
llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp | ||
714–749 | Could you use data expansion to test this and reduce duplication (& then it might not be too bad to test all the cases, rather than only a sample/exemplar)? Sometihng like the pet thing using ValuesIn shown here: https://github.com/google/googletest/blob/main/docs/advanced.md (maybe have a separate Darwin and Linux test (or maybe even have that as a parameter too) and then pairs of section name + true/false for whether it has an initializer)) |
Aside/@lhames - I /think/ maybe this is meant to be detected by flag rather than name? ( https://docs.oracle.com/cd/E19683-01/816-1386/6m7qcobks/index.html "When creating a dynamic object, the link-editor identifies these arrays with the .dynamic tags DT_PREINIT_ARRAY and DT_PREINIT_ARRAYSZ, DT_INIT_ARRAY and DT_INIT_ARRAYSZ, and DT_FINI_ARRAY and DT_FINI_ARRAYSZ accordingly, so that they may be called by the runtime linker." - so maybe these shouldn't be being detected by name, but by these tags? In any case, that could be fixed here separately from this change in review, but something to keep in mind, perhaps.